Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp to access database

Status
Not open for further replies.

dcarbone

Programmer
Aug 22, 2003
29
CA
I am trying to select records from a table, based on their number in an autonumber field. But when i run the query, i get DATA type mismatch.

i used the following code

sql = "select * from table where ID = '"& id &"' "
 
Remove the single quotes around the id
since the field should be a number

sql = "select * from table where ID = "& id
 
what id number are you trying to display?

Replace the '"& id &"' " with the id number you're trying to display


--------------------------------------------------------------------------------------------
aka.bmp
 
I guess you're not trying to display a specific Id. do as SarkMan said


--------------------------------------------------------------------------------------------
aka.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top