Help on SELECT WHERE ID is Access auto numer

X

xfile

Hi:

Could someone kind enough to tell me what is the proper expression for using
SELECT and a conditional criteria for the auto numbered primary key in
Access database, as I have tried to find so long but unsucessful.

The following is the code example where ID is the Access database
autonumbered primary key field, and & AutoNo & is value from ASP form.

"SELECT * FROM tb1ABC WHERE ID='" & AutoNo & "' ",Cn,3

I understand that single quote maybe incorrect for number, but I could not
find, otherwise, what is correct for long integer and auto number.

Thanks so much.
 
A

Andi Mayer

Hi:

Could someone kind enough to tell me what is the proper expression for using
SELECT and a conditional criteria for the auto numbered primary key in
Access database, as I have tried to find so long but unsucessful.

The following is the code example where ID is the Access database
autonumbered primary key field, and & AutoNo & is value from ASP form.

"SELECT * FROM tb1ABC WHERE ID='" & AutoNo & "' ",Cn,3

I understand that single quote maybe incorrect for number, but I could not
find, otherwise, what is correct for long integer and auto number.

for numbers leave the quote out
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top