Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting into a .dbf GENERAL field from C#
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Inserting into a .dbf GENERAL field from C#
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01392510
Message ID:
01392510
Vues:
144
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform