I am in the middle of converting some apps from Foxpro to C#. One particular function that is buging me is the Foxpro function to APPEND MEMO. Basically it opens a specified .txt file and appends all text to whatever field specified. In Foxpro the code is this...
APPEND MEMO myField FROM (myFile)
Foxpro is relitively happy to perform this function.
However C# gives me the flying finger when passing this request through an OleDbCommand.CommandText.
a sample of my code is this...
con = "Provider=VFPOLEDB.1; Data Source=" + _boxSource;
OleDbConnection dbcon;
dbcon = new OleDbConnection(con);
OleDbCommand ocmd = new OleDbCommand();
ocmd.Connection = dbcon;
ocmd.CommandText = "APPEND MEMO myField FROM \"" + myFile + "\"";
ocmd.ExecuteNonQuery();
It crashes on the ExecuteNonQuery() statement.
Any clues?
Thanks!
APPEND MEMO myField FROM (myFile)
Foxpro is relitively happy to perform this function.
However C# gives me the flying finger when passing this request through an OleDbCommand.CommandText.
a sample of my code is this...
con = "Provider=VFPOLEDB.1; Data Source=" + _boxSource;
OleDbConnection dbcon;
dbcon = new OleDbConnection(con);
OleDbCommand ocmd = new OleDbCommand();
ocmd.Connection = dbcon;
ocmd.CommandText = "APPEND MEMO myField FROM \"" + myFile + "\"";
ocmd.ExecuteNonQuery();
It crashes on the ExecuteNonQuery() statement.
Any clues?
Thanks!