Insert record to Foxpro dbf using C# code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sanjeewa Dissa
    New Member
    • Dec 2010
    • 1

    Insert record to Foxpro dbf using C# code

    I used following code to insert record to foxpro dbf. But it throws an exception "Command contains unrecognized phrase/keyword." How can I fixed this.

    string strLogConnectio nString = @"Provider=vfpo ledb;Data Source=E:\DBF\f Log.dbf;Collati ng Sequence=machin e;Mode=ReadWrit e;";

    OleDbConnection strConLog = new OleDbConnection (strLogConnecti onString);

    strConLog.Open( );

    OleDbCommand oComm = new OleDbCommand("I nsert into flog(File,Statu s,LogTime) values('"+strFi les+"','"+strDe sc+"','"+dDatet ime+"')", strConLog);

    oComm.ExecuteNo nQuery();
Working...