Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Nov 2003
    Posts
    65
    Thanks
    1
    Thanked 0 Times in 0 Posts

    error '80020009' in SQL string

    I am getting this error on the line of an SQL string, anyone see a problem with it?

    strSQL = "SELECT forum_sub_cat_read FROM tblForumSubCat WHERE tblForumSubCat.forum_sub_cat_id = " & objRs("topic_forum") & ";"


    Error message:

    error '80020009'
    /forum_posts.asp, line 82

    <edit>Using Access DB</edit>
    Any help is greatly appreciated!!

    -r0ck1t-

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    What was the error discriptor?
    OracleGuy

  • #3
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    why are you doing this: tblForumSubCat.forum_sub_cat_id
    instead of just using forum_sub_cat_id

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    response.write the sql statement to see if objRs("topic_forum") returns something

    strSQL = "SELECT forum_sub_cat_read FROM tblForumSubCat WHERE tblForumSubCat.forum_sub_cat_id = " & objRs("topic_forum") & ";"
    response.write strSQL
    response.end
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #5
    New Coder
    Join Date
    Nov 2003
    Posts
    65
    Thanks
    1
    Thanked 0 Times in 0 Posts
    What was the error discriptor?
    What do you mean. That was the entire error message.

    why are you doing this: tblForumSubCat.forum_sub_cat_id
    instead of just using forum_sub_cat_id
    Dunno, that is just the way I have always done it.
    Last edited by r0ck1t; 12-12-2003 at 08:26 AM.

  • #6
    New Coder
    Join Date
    Nov 2003
    Posts
    65
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Response.Write ing the SQL string helped, it gave me some new errors, which I knew how to solve.

    And you were right glenngv, that field was empty.... off to fix that now!!

    Thanks guys!

  • #7
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    To debug sql statements, it always helps to display them before executing them to see if there are syntax errors or what. If there's no syntax error but no records are retrieved, execute the generated sql statement in the db's query analyzer to verify the output.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #8
    New Coder
    Join Date
    Nov 2003
    Posts
    65
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Yeah I check all my statements in query analyzer, just didn't know what the problem was this time.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •