Microsoft JET Database Engine error '80040e07'

G

Guest

Well, I'm getting this project done by writing my own routines instead of
trying to kludge FR03 DBWs.

Now I have another problem.

I get the error: Microsoft JET Database Engine error '80040e07'
Data type mismatch in criteria expression.
/logon/Repair/editor/edit1.asp, line 19

Line 19 of edit1.asp reads:
objRS.Open "Select * from Results WHERE Key ='33'", objConn, 0, 1

NOTE- I need to assign a variable to the '33'. It is read here:
SearchText = CStr(Request("Key"))
Response.Write(SearchText)


I have an include file to open the database:
<%
DIM objRS, objConn
Set objRS = Server.CreateObject("ADODB.Recordset")
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath ("/logon/fpdb/Repairlog.mdb") & ";"
objConn.Open
%>

All of you have been a fantastic help!!

Dave
 
D

Douglas J. Steele

Try:

objRS.Open "Select * from Results WHERE Key ='" & CStr(Request("Key")) &
"'", objConn, 0, 1
 
G

Guest

This gives me the same error.

A few lines earlier in the code I use:

Dim SearchText, strQuery
SearchText = CStr(Request("Key"))
Response.Write(SearchText)

And it displays the correct value for Key

Dave Lagergren
Manager - Data Applications
Wireless Management, Inc
Specializing in cellular wireless applications
 
D

David W. Fenton

A few lines earlier in the code I use:

Dim SearchText, strQuery
SearchText = CStr(Request("Key"))
Response.Write(SearchText)

And it displays the correct value for Key

Is "Key" a string or a number? If it's a number, then lose the
quotes around it.
 
G

Guest

--
Dave Lagergren
Manager - Data Applications
Wireless Management, Inc
Specializing in cellular wireless applications
 

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