HELP I am new to sql and have been staring at the following INSERT statement for too long
it comes back with a syntax error
msRequestTable = "printrequesttable"
sSQL = "INSERT INTO " & _
msRequestTable & " " & _
"(data_capture_dt,doc_id,code,label,queue,jobhost,printer,priority,defertime,repeatint,apppath,links,execorder,parameters,status,eb_key_id) " & _
"VALUES ('" & dtmDataCaptureDate & "', " & _
icode & ", " & _
"'" & sDocID & "', " & _
"'" & sLabel & "', " & _
"'" & sQueue & "', " & _
"'" & sJobHost & "', " & _
"'" & sPrinter & "', " & _
iPriority & "," & _
iDeferTime & "," & _
iRepeat & "," & _
"'" & sAppPath & "'," & _
"'" & sLinks & "', " & _
iExecorder & "," & _
"'" & sParameters & "'," & _
"'" & sStatus & "'," & _
"'" & sKeyData1 & "'" & "
"
I know this is a long shot Maybe I will get lucky!!
the fields I am putting into the table match the fields in the table in other words I am not trying to put a integer into a string field etc
it comes back with a syntax error
msRequestTable = "printrequesttable"
sSQL = "INSERT INTO " & _
msRequestTable & " " & _
"(data_capture_dt,doc_id,code,label,queue,jobhost,printer,priority,defertime,repeatint,apppath,links,execorder,parameters,status,eb_key_id) " & _
"VALUES ('" & dtmDataCaptureDate & "', " & _
icode & ", " & _
"'" & sDocID & "', " & _
"'" & sLabel & "', " & _
"'" & sQueue & "', " & _
"'" & sJobHost & "', " & _
"'" & sPrinter & "', " & _
iPriority & "," & _
iDeferTime & "," & _
iRepeat & "," & _
"'" & sAppPath & "'," & _
"'" & sLinks & "', " & _
iExecorder & "," & _
"'" & sParameters & "'," & _
"'" & sStatus & "'," & _
"'" & sKeyData1 & "'" & "
I know this is a long shot Maybe I will get lucky!!
the fields I am putting into the table match the fields in the table in other words I am not trying to put a integer into a string field etc