Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append a memo type field to foxpro table from C#

Status
Not open for further replies.

larker1

Technical User
Mar 12, 2003
1
US
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!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top