Results 1 to 4 of 4

Thread: SQL troubles... URGENT

  1. #1

    Thread Starter
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205

    SQL troubles... URGENT

    "UPDATE traineeReport SET TWA_Attempted = Yes, TWA_Correct

    = " & Session("CorrectAnswers") & ", TWA_Wrong = " & Session("WrongAnswers") & " WHERE

    employeeNumber = " & Session("CurrentEmployee")


    I am using the above SQL string in an ASP page. I am having a problem in that the above sets TWA_Attempted, TWA_Correct, TWA_Wrong correctly, but it sets these values for EVERY employeeNumber.

    For some reason, it is not picking the correct employeeNumber.

    WHY???

    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  2. #2
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    Are you sure there is some value in the CurrentEmployee variable? If the variable is blank, it could make the query execute on all records.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  3. #3

    Thread Starter
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    Check this thread, it was getting more usage, and you can get up to date on where the problem stands.
    Thanks for your help.


    http://forums.vb-world.net/showthrea...hreadid=117422

    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  4. #4

    Thread Starter
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    But the answer is yes, I am sure of that, although I wouldn't think that would make any difference - if CurrentEmployee was blank, the query would execute on NO records, as none of the records have employeeNumber = NOTHING (or whatever null value would be in that place).
    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

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