I am trying to update multiple records in 1 hit, i have a page that sends the info to an update page with ids for the records generated with a count, these are mp31, mp32 etc and also an id for the text i want updated, this is just a number to represent the order the mp3s are listed in on the site this is textfield1, textfield2 etc
my code on the update page is
i am getting the following error with the response write of the sql update
UPDATE mp3 SET orderno = ' ' WHERE idnumbermp3 =
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'idnumbermp3 ='.
/admin/updateok.asp, line 32
can anyone point me in the right direction
line 32 is
my code on the update page is
Code:
Dim iCount
iCount = Request.Form("mp3count")
Dim strLink, strID
Set mp3Connection=Server.CreateObject("ADODB.Connection")
DatabaseDetails="DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("../../private/yaketynew.mdb") & ";"
mp3Connection.Open DatabaseDetails
Dim iLoop
For iLoop = 0 to iCount
strLink = Request(iLoop & ".orderno")
strID = Request(iLoop & ".idmp3")
response.write(strID)
response.write(strLink)
strSQL = "UPDATE mp3 SET orderno = ' " & strLink & " ' " & " WHERE idnumbermp3 = " & strID
Response.write(strSQL)
set mp3Recordset=mp3Connection.Execute(strSQL)
Next
mp3connection.Close
Set mp3connection = Nothing
UPDATE mp3 SET orderno = ' ' WHERE idnumbermp3 =
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'idnumbermp3 ='.
/admin/updateok.asp, line 32
can anyone point me in the right direction
line 32 is
Code:
set mp3Recordset=mp3Connection.Execute(strSQL)
Comment