|
Kage -> Ugh, any clue as to why this doesnt work? (12/4/2003 14:00:00)
|
[>:] I have no clue why this doesn work, maybe you gurus can help. when the code: <% ' ' ' ' declare all the variables DIM SQL, objRS, objConn, strConn, strID DIM strTo1, strFrom1, strDate1, strPickticketCtrlNo, strToteColor, strQTY, strPartNo, strLocation DIM strDescription, strNotes, strResolution, strSignature, strDateCompleted ' ' ' ' pull all the data from the previous page strID = Request.Form("ID") strTo1 = Replace(Request.Form("To1"), "'", "''") strFrom1 = Replace(Request.Form("From1"), "'", "''") strDate1 = Replace(Request.Form("Date1"), "'", "''") strPickticketCtrlNo = Replace(Request.Form("PickticketCtrlNo"), "'", "''") strToteColor = Replace(Request.Form("ToteColor"), "'", "''") strQTY = Replace(Request.Form("QTY"), "'", "''") strPartNo = Replace(Request.Form("PartNo"), "'", "''") strLocation = Replace(Request.Form("Location"), "'", "''") strDescription = Replace(Request.Form("Description"), "'", "''") strNotes = Replace(Request.Form("Notes"), "'", "''") strResolution = Replace(Request.Form("Resolution"), "'", "''") strSignature = Replace(Request.Form("Signature"), "'", "''") strDateCompleted = Replace(Request.Form("DateCompleted"), "'", "''") ' ' ' ' create sql statement SQL = "UPDATE ""details"" SET " SQL = SQL & "To1 = '" & strTo1 & "'" SQL = SQL & ", From1 = '" & strFrom1 & "'" SQL = SQL & ", Date1 = #" & strDate1 & "#" SQL = SQL & ", PickticketCtrlNo = '" & strPickticketCtrlNo & "'" SQL = SQL & ", ToteColor = '" & strToteColor & "'" SQL = SQL & ", QTY = '" & strQTY & "'" SQL = SQL & ", PartNo = '" & strPartNo & "'" SQL = SQL & ", Location = '" & strLocation & "'" SQL = SQL & ", Description = '" & strDescription & "'" ' ' ' ' ' if Notes has data then add Notes ' ' ' ' to the sql statement IF strNotes <> "" THEN SQL = SQL & ", Notes = '" & strNotes & "'" END IF ' ' ' ' ' if Resolution has data then add Resolution ' ' ' ' to the sql statement IF strResolution <> "" THEN SQL = SQL & ", Resoultion = '" & strResoultion & "'" END IF ' ' ' ' ' if Signature was checked then add Signature ' ' ' ' to the sql statement IF strSignature <> "" THEN SQL = SQL & ", Signature = '" & strSignature & "'" END IF ' ' ' ' if DateCompleted was checked then add DateCompleted ' ' ' ' to the sql statement IF strDateCompleted <> "" THEN SQL = SQL & ", DateCompleted = #" & strDateCompleted & "#" END IF ' ' ' ' finish the sql statement SQL = SQL & " WHERE ID = " & strID & "" ' ' ' ' creates a connection object Set objConn = Server.CreateObject("ADODB.Connection") ' ' ' ' identifies the database and tells the computer where to store the data strConn = "DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=" & Server.MapPath("../fpdb/whcomm.mdb") ' ' ' ' opens the database objConn.Open strConn ' ' ' ' creates the recordset Set objRS = Server.CreateObject("ADODB.Recordset") ' ' ' ' executes the sql statement Set objRS = objConn.Execute (SQL) ' ' ' ' clears the memory buffer Set objRS = Nothing Set objConn = Nothing %> runs i get the error message: Microsoft OLE DB Provider for ODBC Drivers error '80040e10' [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. /NewWarehouseCommunicator/functionpick2.asp, line 82 any suggestions?
|
|
|
|