var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Delete AUTONUMBER in ACCESS using ASP
***ASP & ACCESS***
So i eventually got it right inserting data into a table that holds an autonumber field....
The problem I'm facing now is to delete one of those records.
For some reason it just isn't as simple as deleting a record where there isn't an autonumber involved...
I basically have:
sql1 = "DELETE * FROM table WHERE userID = '" & tempID & "' "
THIS STATEMENT USED TO WORK WHEN THE ID FIELD WAS SET AS TEXT.
So my guess is that something else has to change.
Anybody out there that can shine some light on my problem?
Thanks in advance!
sql1 = "DELETE * FROM table WHERE userID = " & tempID & " "
your id field is now a number, not text. Removing the single quote will allow the statement to work...
In theory comparing a numeric value to a string value should never find a match because they are nothing like each other, it would be like comparing the clock speed of a computer with the clock speed of a coconut.
Thank you for your reply
I made the changes and it works!
Now i also know why.
THANK YOU ONCE AGAIN!
It works on the same theory as comparing NULL.
You should never use
if XYZ = Null then
because if something is null it means you have no idea what it is,.. it is completely undefined.... you don't know that it doesn't = XYZ because you can't compare the two together....
Anyway, glad to be of service.
Hmmm...what would the clock speed of a coconut be if it were carried by an African swallow? heh-heh
Originally posted by rokslide
...it would be like comparing the clock speed of a computer with the clock speed of a coconut.