Exception: Syntax error in INSERT INTO statement

Sep 16 2007 3:35 PM


I just spendfew long hours trying to understand why I got this exception.

This is my code:

string strDSN = "Provider=Microsoft.Jet.OLEDB.4.0;"

         + "Data Source=D:\\PlayerRegistered.mdb";

string strSQL = "INSERT INTO Players"+






OleDbConnection myConn = new OleDbConnection(strDSN);

OleDbCommand myCmd = new OleDbCommand(strSQL,myConn);






catch (Exception exp)


      Console.WriteLine("Error:{0}", exp.Message);



I checked my syntax  dozens of times and I couldn't found nothing wrong  in it.

can somone please help me???

Answers (5)