crymedry
MIS
- Nov 19, 2003
- 54
hello again everyone,
i am trying to write this script that will update records that already exist in a database .... but i keep getting a syntax error. i have tried every way of typing this in that i can think of, and the only difference is the different syntax errors. here is the code as i have it right now:
StrGet="SELECT * FROM Issues WHERE [_id] = " & frm_misId & ""
StrInsert="UPDATE Issues (_detailSituation, _solution, _status"
StrValues="Values('" & frm_misDetail & "','" & frm_misSolution & "','" & frm_misStatus & "'"
'create a connection
Set objConn=Server.CreateObject("ADODB.Connection")
objConn.Open "DSN=miskb"
Set objCmd=Server.CreateObject("ADODB.Command")
Set objCmd.ActiveConnection=objConn
objCmd.CommandText="" & StrGet & " " & strInsert & " " & strValues & ""
and here is the error that i get as of now:
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression '[_id] = 31 UPDATE Issues (_detailSituation, _solution, _status Values('test','','New''.
i would appreciate any help that you may have.
thanks in advance,
CMD
i am trying to write this script that will update records that already exist in a database .... but i keep getting a syntax error. i have tried every way of typing this in that i can think of, and the only difference is the different syntax errors. here is the code as i have it right now:
StrGet="SELECT * FROM Issues WHERE [_id] = " & frm_misId & ""
StrInsert="UPDATE Issues (_detailSituation, _solution, _status"
StrValues="Values('" & frm_misDetail & "','" & frm_misSolution & "','" & frm_misStatus & "'"
'create a connection
Set objConn=Server.CreateObject("ADODB.Connection")
objConn.Open "DSN=miskb"
Set objCmd=Server.CreateObject("ADODB.Command")
Set objCmd.ActiveConnection=objConn
objCmd.CommandText="" & StrGet & " " & strInsert & " " & strValues & ""
and here is the error that i get as of now:
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression '[_id] = 31 UPDATE Issues (_detailSituation, _solution, _status Values('test','','New''.
i would appreciate any help that you may have.
thanks in advance,
CMD