Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting into a .dbf GENERAL field from C#
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Inserting into a .dbf GENERAL field from C#
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01392510
Message ID:
01392510
Views:
145
Hi All;

We have a VFP application that adds records to a .dbf free table and updates an OLE General field with a pointer to a Word Document. The VFP code that works is listed below.

USE FILE1
APPEND blank
REPLACE z_date with date()
REPLACE z_id with recid
REPLACE z_type with 'AFW2_2'
APPEND GENERAL z_data FROM ”c:\test\myresume.doc” CLASS MICROSOFTWORD

We are trying to replicate this in C#. We can do everything but insert the link into the General field. What we have below is as close as we can come using the VFP ODBC connector to accomplish the same results as the VFP code above.

DBCommand = DBConnection.CreateCommand();
DBCommand.CommandText = "insert into FILE1 (Z_DATE,Z_ID,Z_DATA)" +
" values (Date()," +
"'" + Sage_OrgID + "'," +
"'')";
DBCommand.ExecuteNonQuery();
DBCommand.Dispose();

Is there some special trick to getting data into these General Fields? I remember have to fool around with it to get the VFP code working originally . Any assistance would be greatly appreciated.
Next
Reply
Map
View

Click here to load this message in the networking platform