Click to See Complete Forum and Search --> : updating Sql server table


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

Davey
September 22nd, 2004, 04:20 PM
Which is line 328? Is it all of the SQL statement or just a bit of it?