Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
Thread: Data Type Mismatch
09-19-2005, 09:11 AM #1
Data Type Mismatch
hey guys im getting this error.
Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression.
/SamDave/Pages/ShowNews.asp, line 55
this is my line 55 now.
<% cnnLogin.execute("UPDATE _news SET news_views = news_views + 1 WHERE ID = '" & request.QueryString("show") & "'") %>
Table Name = _News
Updating Into = news_VIEWS = Text
i googled the error and found nothing that would help
09-19-2005, 09:19 AM #2
- Join Date
- Jun 2002
- Thanked 248 Times in 245 Posts
Is the ID field numeric or text? If it's numeric then you should remove the single quotes.
But make sure the input id is numeric.Code:<% cnnLogin.execute("UPDATE _news SET news_views = news_views + 1 WHERE ID = " & request.QueryString("show")) %>
Code:<% dim id id = request.QueryString("show") if not isnumeric(id) then response.write "Invalid id." response.end end if '... cnnLogin.execute("UPDATE _news SET news_views = news_views + 1 WHERE ID = " & id) %>
Tower of Hanoi Android app (Ad-FREE!)
Tower of Hanoi Android app (FREE!)
Tower of Hanoi Leaderboard
Samegame Facebook App
Samegame Facebook App Leaderboard
vBulletin 5 Floating Bar Mod
vBulletin 5 Photo Slideshow Mod
vBulletin 5 Quote Selected Text Mod
vBulletin 5 Profile Preview Tooltip Mod
09-19-2005, 09:24 AM #3
thank u very much works like a charm