Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Data type mismatch in criteria expression.
Old 05-11-2006, 08:20 AM Data type mismatch in criteria expression.
Skilled Talker

Posts: 79
Trades: 0
Hi there, I got the sql to work on the last problem but now come up with the following when I try to update.

Microsoft JET Database Engineerror '80040e07'

Data type mismatch in criteria expression. /html/user-info-standard.asp, line 150

CODE
' execute the update
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute <---------------------------
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>

Any ideas on how to trouble shoot?
malhyp is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-11-2006, 09:14 AM Re: Data type mismatch in criteria expression.
Skilled Talker

Posts: 79
Trades: 0
I just noticed that if I enter a number rather than text, it works....

Anyway around this by changing a little code?
malhyp is offline
Reply With Quote
View Public Profile
 
Old 05-11-2006, 09:52 AM Re: Data type mismatch in criteria expression.
ExpressoDan's Avatar
Ultra Talker

Posts: 317
Name: This Space for Rent
Location: Georgia
Trades: 0
Give us the line of code that defines " MM_editQuery"

Check the column in the database, its probably a numeric column. change it to text or varchar depending on what type of database you're using.
__________________

Please login or register to view this content. Registration is FREE

"I think therefore I am, I think." <!-- George Carlin
ExpressoDan is offline
Reply With Quote
View Public Profile Visit ExpressoDan's homepage!
 
Old 05-11-2006, 06:55 PM Re: Data type mismatch in criteria expression.
Experienced Talker

Posts: 30
Trades: 0
To find out what's wrong with the SQL statement, I usually add a dummy string variable to store the SQL statement and write it to a log file, or use msgbox to display that SQL statement. Then I copy and paste it to the query analyser of the MS access/MS SQL Server/MySQL to iron out the syntax problem of the SQL statement. This makes my life much easier, and don't need to run the whole program all over again each time.

Good Luck
__________________

Please login or register to view this content. Registration is FREE
MyOpinion is offline
Reply With Quote
View Public Profile
 
Old 05-12-2006, 01:39 AM Re: Data type mismatch in criteria expression.
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Another trick you can use is to copy/paste the MM_editQuery onto a new line and edit the second one. That way, if you screw it up too badly, you can refer back to the first one.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Reply     « Reply to Data type mismatch in criteria expression.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21686 seconds with 12 queries