Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem having mismatch criteria

Status
Not open for further replies.

psyren

Technical User
Jul 21, 2003
22
SG
hi, i got a problem in this page its actually an action page for a insertin page.. but when i insert values in the insert page and the action page responded i'm gettin a mismatch criteria... what is that anyways? but i thoroughly checked all the phrases i use are the same.... well if theres any way u guys can explain to me i appreciate the help or point out what ive done wrong? TANKX here's da source code ive done in the page





<!--#include file="connection.asp"-->
<!--#include file="adovbs.inc"-->

<%
'On Error Resume Next

proj_id= Request("proj_id")
proj_title = Request("proj_title")
submission_date= Request("submission_date")
nameA= Request("nameA")
s1_class= Request("s1_class")
planned_d =Request("planned_d")
planned_d2 =Request("planned_d2")
planned_d3 =Request("planned_d3")
planned_d4 =Request("planned_d4")
planned_d5 =Request("planned_d5")
planned_d6 =Request("planned_d6")
dc =Request("dc")
dc2 =Request("dc2")
dc3 =Request("dc3")
dc4 =Request("dc4")
dc5 =Request("dc5")
dc6 =Request("dc6")
status_r =Request("status_r")
status_r2 =Request("status_r2")
status_r3 =Request("status_r3")
status_r4 =Request("status_r4")
status_r5 =Request("status_r5")
status_r6 =Request("status_r6")
cap =Request("cap")
cap2 =Request("cap2")
cap3 =Request("cap3")
cap4 =Request("cap4")
cap5 =Request("cap5")
cap6 =Request("cap6")




set rs = server.createObject("ADODB.Recordset")
RS.open "pr", canvasDB, adLockOptimistic, adCmdTable

theSQL = "insert into pr"
theSQL = theSQL & "([proj_id], [proj_title], [submission_date], [name], [s1_class], [planned_d], [planned_d2], [planned_d3], [planned_d4], [planned_d5], [planned_d6], [dc], [dc2], [dc3], [dc4], [dc5], [dc6], [status_r], [status_r2], [status_r3], [status_r4], [status_r5], [status_r6], [cap], [cap2], [cap3], [cap4], [cap5], [cap6])"
theSQL = theSQL & " values ('"&proj_id&"', '"&proj_title&"', '"&submission_date&"', '"&nameA&"', '"&s1_class&"', '"&planned_d&"', '"&planned_d2&"', '"&planned_d3&"', '"&planned_d4&"', '"&planned_d5&"', '"&planned_d6&"', '"&dc&"', '"&dc2&"', '"&dc3&"', '"&dc4&"', '"&dc5&"', '"&dc6&"', '"&status_r&"', '"&status_r2&"', '"&status_r3&"', '"&status_r4&"', '"&status_r5&"', '"&status_r6&"', '"&cap&"', '"&cap2&"', '"&cap3&"', '"&cap4&"', '"&cap5&"', '"&cap6&"') "
canvasDB.execute(theSQL)

rs.close
set rs=nothing
canvasDB.close
set canvasDB=nothing
%>







Error Type:
Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression.
/beta_250204/TMP1psbfucdre.asp, line 49


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)

Page:
GET /beta_250204/TMP1psbfucdre.asp
 
You could use the simpler way.
Code:
set rs = server.createObject("ADODB.Recordset")
sql="select top 1 * from pr"
rs.open sql, canvasDB, 3,3
rs.AddNew
 rs("proj_id")=proj_id
 ...
rs.Update

________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
Do a Response.Write on theSQL, see what it displays before you execute it. You have single quotes around all your values, if some of the fields are number or currency then you don't need the single quotes. Could be that.

Regards,

Patrick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top