Can anyone tell what's wrong with this update query?
I'm getting the following error:
Syntax error in UPDATE statement.
Here's the pertinent code:
Dim fileID
Dim fileCatID
Dim fileTitle
Dim qUpdate
fileID = request.form("id")
fileCatID = request.form("cat_id")
fileTitle = Trim(request.form("title"))
Set qUpdate = Server.CreateObject("ADODB.Recordset")
qUpdate.ActiveConnection = strServerConnection
qUpdate.Source = "UPDATE downloads SET title = '" & fileTitle & "', cat_id = " & fileCatID & " WHERE id = " & fileID
qUpdate.Open()
qUpdate.Execute
qUpdate.Close
I'm getting the following error:
Syntax error in UPDATE statement.
Here's the pertinent code:
Dim fileID
Dim fileCatID
Dim fileTitle
Dim qUpdate
fileID = request.form("id")
fileCatID = request.form("cat_id")
fileTitle = Trim(request.form("title"))
Set qUpdate = Server.CreateObject("ADODB.Recordset")
qUpdate.ActiveConnection = strServerConnection
qUpdate.Source = "UPDATE downloads SET title = '" & fileTitle & "', cat_id = " & fileCatID & " WHERE id = " & fileID
qUpdate.Open()
qUpdate.Execute
qUpdate.Close