|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Using autonumber value as a parameter
I'm trying to query a MS Access database using an autonumber value as the search parameter but I'm getting a
Data type mismatch in criteria expression error My code is sql = "Select * from tblContent where Ad_Id = '" & adID &"'" Set RS = Conn.Execute(sql) If anyone can help me I'd really appreciate it. Thanks |
|
#2
|
||||
|
||||
|
sql = "Select * from tblContent where Ad_Id = '" & adID &"'"
Set RS = Conn.Execute(sql) just remove the single quote before and after ampersand following will do sql = "Select * from tblContent where Ad_Id = " & adID Set RS = Conn.Execute(sql)
__________________
V.Subramanian |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Using autonumber value as a parameter |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|