Results 1 to 9 of 9

Thread: session

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Manchester
    Posts
    446

    session

    Can anyone tell me whats wrong with this...

    At the beginning of the ASP file is this:

    Session("id") = Request.QueryString("id")


    Command = "SELECT * FROM webdata where id = " & Session("id")

    help help ....


    Cheers
    "Life isn't about finding yourself. Life is about creating yourself."
    --George Bernard Shaw

  2. #2
    Member shamloo's Avatar
    Join Date
    Oct 2000
    Location
    Stockholm, Sweden
    Posts
    32
    well, I have no idea what's wrong since you did not show us any error message, but look if you have a value in Request.QueryString("id") by simply do a Response.write(Request.QueryString("id")).
    The second thing that could be wrong is that the value might be a string("0" is NOT the same as 0). In the SQL-string you treat id as a number(int) so you might want to convert it(to be sure it really is a int): cInt(Request.QueryString("id")) or int(Request.QueryString("id")).

    hope this helps!
    /David
    "There are no must's in life unless you provide for someone else than yourself"

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Manchester
    Posts
    446
    Here's the error:

    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
    [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'id ='.

    /gazcomp/default.asp, line 221
    "Life isn't about finding yourself. Life is about creating yourself."
    --George Bernard Shaw

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Manchester
    Posts
    446
    I've done this but still 0

    Session("id") = cInt(Request.QueryString("id"))
    "Life isn't about finding yourself. Life is about creating yourself."
    --George Bernard Shaw

  5. #5
    Member shamloo's Avatar
    Join Date
    Oct 2000
    Location
    Stockholm, Sweden
    Posts
    32
    another possible problem could be that you use POST instead of GET in the form-page. if this is the case, Request.QueryString("id") will be empty and therfore you will get an error.

    I think GET is the default value when you create a form and do not specify a form-method.
    /David
    "There are no must's in life unless you provide for someone else than yourself"

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Manchester
    Posts
    446
    I've got it working but.... please click here i'm flippin lost know.. it wont update the edited file.

    http://www.vbforums.com/showthread.p...threadid=74435
    "Life isn't about finding yourself. Life is about creating yourself."
    --George Bernard Shaw

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Manchester
    Posts
    446

    heeeeeeeeeeeeeeeel-p

    I've got it working but.... please click here i'm flippin lost know.. it wont update the edited file.

    http://www.vbforums.com/showthread.p...threadid=74435
    "Life isn't about finding yourself. Life is about creating yourself."
    --George Bernard Shaw

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Manchester
    Posts
    446

    Unhappy heeeeeeeeeeeeeelp

    I've got it working but.... please click here i'm flippin lost know.. it wont update the edited file.

    http://www.vbforums.com/showthread.p...threadid=74435
    "Life isn't about finding yourself. Life is about creating yourself."
    --George Bernard Shaw

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Manchester
    Posts
    446

    Unhappy heeeeeeeeeeeeeelp

    I've got it working but.... please click here i'm flippin lost know.. it wont update the edited file.

    http://www.vbforums.com/showthread.p...threadid=74435
    "Life isn't about finding yourself. Life is about creating yourself."
    --George Bernard Shaw

Posting Permissions

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



Click Here to Expand Forum to Full Width