Forums

This topic is locked

Data type mismatch in criteria expression 80040E07

Posted 14 Jul 2002 14:27:17
1
has voted
14 Jul 2002 14:27:17 Giuseppina Ruberto posted:
Following error received when trying to do a search on an Access2000 table (no dates/time fields are included in the table).

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
/Catalogue/results.asp, line 25

Below is the SQL code used.

SELECT *
FROM Product
WHERE catID LIKE 'formCat' AND prodPrice <'formPrice' AND prodDesc LIKE '*formKey*'
ORDER BY catID

Line 25 Code is:
searchresults.Open()

Anybody got any ideas to help a struggling beginner? I'm using book Sams teach yourself dreamweaver ultradev4 in 21 days except am using Access2000 instead of mySQL but there are no tips in the book regarding this problem.

Replies

Replied 15 Jul 2002 22:54:08
15 Jul 2002 22:54:08 Cycie Cycie replied:
well try to use tje criteria one by one and see where it stucks..

but for example, if you place ' around formCat you say catID = '1', doesn't that has to be catID=1 ?
or is catID a number

WHERE catID LIKE 'formCat' AND prodPrice <'formPrice' AND prodDesc LIKE '*formKey*'

Reply to this topic