Interview Question in Visual Studio 2008


 

Interview Question :: I am having a problem with an insert statement in Visual Basic 8 connecting to an Access Database

Getting syntax error in INSERT TO statement. That is all the information I get. Here is my code. Parameters are set after last statement


Dim Cmd As OleDb.OleDbCommand
Dim Con As OleDb.OleDbConnection
Dim Sql As String = Nothing
Con = New OleDb.OleDbConnection("Provider=Microsof... source=" & "C:\Documents and Settings\MPAXTON1\My Documents\Visual Studio 2008\Projects\GunLog\GunLog\TeklogixRetu... & "")
Sql = "INSERT INTO GunLog(date, sc_num, wh_id, gun, model, send_tek, sendRMA, return_tek, returnRMA, problem, employee, call_tek, tek_assoc, tek_sc) VALUES (@date, @sc_num, @wh_id, @gun, @model, @send_tek, @sendRMA, @return_tek, @returnRMA, @problem, @employee, @call_tek, @tek_assoc, @tek_sc)"
Cmd = New OleDb.OleDbCommand(Sql, Con)
by ksk