Jump to content

Data type mismatch in criteria expression error. P


mrshlick

Recommended Posts

Im trying to make links that will only bring up data form my database based on thier ID number. Im using microsoft Access and the database is called database.mdb, with the table Adaptors and the field ID which is set to autonumber. heres my code:<% Dim ID, conn, rs, dataSQLID = Request.QueryString ("ID")Set conn = Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.Mappath("database\database.mdb"))Set rs = Server.CreateObject("ADODB.recordset")dataSQL = " SELECT * FROM Adaptor WHERE ID = '" & ID & "' "rs.Open dataSQL, connDo While Not rs.EOF%>and heres the browser error:Error Type:Microsoft JET Database Engine (0x80040E07)Data type mismatch in criteria expression./partswebsite/includes/adaptor.inc, line 10Line 10 is: rs.Open dataSQL, connThanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...