Interview Question in Sql Server Views
Interview Question :: ASP Error when viewing details for specific record in Access DB
I am using classic ASP / VBScript and Access for a DB. On the first page, I have a dynamic link which goes to a details page for a record in the images table of my DB.
The link on the first page looks like this:
http://www.mydomain.net/cp/cp-phoDel.asp...
The code I am using in the details page to set the RS is this:
sql = "SELECT * FROM images WHERE id = '" & id & "'"
Set rsPho = Server.CreateObject("ADODB.Recordset")
rsPho.Open sql, conn, 3, 3
"id" is a field in the images table of the database. It's data type is set to autoNumber and for some reason I get the feeling that's part of my problem. Since this is the only unique identifier in the table, I need to use it, but I think I'm calling it wrong in my sql.
This is the error I'm getting.
Microsoft JET Database Engine error '80040e07'
Data type mismatch in criteria expression.
/cp/cp-phoDel.asp, line 21
That line is the sql i pasted at the top.
Thanks guys.

Loading ...