deejaa
September 21st, 2004, 08:42 AM
I am getting an error on an update to sql server. i am writing an ASP page with VBscript.
Here is my code
probStr = "UPDATE [CLN-Hardware] SET " & _
"entrydate ='" & cdate(Request.form("uentrydate")) & "', " & _
"itemtype ='" & (Request.form("uitemtype")) & "', " & _
"make ='" & (Request.form("umake")) & "', " & _
"model ='" & (Request.form("umodel")) & "', " & _
"serial ='" & (Request.form("userial")) & "', " & _
"tagnumber ='" & (Request.form("utagnumber")) & "', " & _
"sitelocation ='" & (Request.form("usitelocation")) & "', " & _
"locinsite ='" & (Request.form("ulocinsite")) & "', " & _
"note ='" & (Request.form("unote")) & "', " & _
"warrantyexpire ='" & cdate(Request.form("uwarrantyexpire")) & "', " & _
"broken =" & tmpbroke & ", " & _
"disposed =" & tmpdisp & ""
probStr = probStr & " WHERE uid=" & id
Set probStr = Server.CreateObject("ADODB.Recordset")
probStr.Open probStr, cnnSearch,3,3
Here is my connection string:
cnnSearch.Open "Provider=SQLOLEDB;Data Source=##.###.##.##;" _
& "Initial Catalog=CLN-Inventory;User Id=sa;Password=;" _
& "Connect Timeout=15;Network Library=dbmssocn;"
this is the error that appears on execution:
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/Inventory/hardwaredetails.asp, line 328
i did a response write to get the string and pasted it in Query Analyzer and it ran fine.
Any suggestions?
thanks
Here is my code
probStr = "UPDATE [CLN-Hardware] SET " & _
"entrydate ='" & cdate(Request.form("uentrydate")) & "', " & _
"itemtype ='" & (Request.form("uitemtype")) & "', " & _
"make ='" & (Request.form("umake")) & "', " & _
"model ='" & (Request.form("umodel")) & "', " & _
"serial ='" & (Request.form("userial")) & "', " & _
"tagnumber ='" & (Request.form("utagnumber")) & "', " & _
"sitelocation ='" & (Request.form("usitelocation")) & "', " & _
"locinsite ='" & (Request.form("ulocinsite")) & "', " & _
"note ='" & (Request.form("unote")) & "', " & _
"warrantyexpire ='" & cdate(Request.form("uwarrantyexpire")) & "', " & _
"broken =" & tmpbroke & ", " & _
"disposed =" & tmpdisp & ""
probStr = probStr & " WHERE uid=" & id
Set probStr = Server.CreateObject("ADODB.Recordset")
probStr.Open probStr, cnnSearch,3,3
Here is my connection string:
cnnSearch.Open "Provider=SQLOLEDB;Data Source=##.###.##.##;" _
& "Initial Catalog=CLN-Inventory;User Id=sa;Password=;" _
& "Connect Timeout=15;Network Library=dbmssocn;"
this is the error that appears on execution:
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/Inventory/hardwaredetails.asp, line 328
i did a response write to get the string and pasted it in Query Analyzer and it ran fine.
Any suggestions?
thanks