Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting into a .dbf GENERAL field from C#
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01392510
Message ID:
01392698
Vues:
47
>Thanks for your response. Can you issue the APPEND GENERAL command through the ODBC connection? Will foxpro process it similar to how it processes a command in a .prg file? How would we issue or code this command?

I can only repeat that I do not know what do you mean exactly "ODBC connection".
VFP OLEDB provider is a better choice anyway.

From VFP Help, "OLE DB Provider for Visual FoxPro", "Supported Visual FoxPro Commands and Functions in OLE DB Provider" one can see that APPEND GENERAL is supported. So, in theory you can use it with VFP OLE DB provider.
Before doing it in C you can check whether it works from VFP environment and with ADO statements like:
cnnVFP = createobj("adodb.Connection")
cnnVFP.Open ("Provider=VFPOLEDB.1;Data Source=C:\"+CURDIR()+";Collating Sequence=MACHINE")
cnnVFP.Execute("set exclusive off")

lctext="use table_name"+CHR(13)+"go record_number"+CHR(13)+"APPEND general lGfile FROM filename"
?cnnVFP.Execute([EXECSCRIPT("]+lctext+[")]).Fields(0).Value
However when I tryed the above, it gave me "The feature is not supported" message on the very last line.
But this command is working:
lctext="use table_name"+CHR(13)+"go record_number"+CHR(13)+"blank fields lGfile"


I doubt that you will find anybody having solid experience with general fields via ODBC/OLEDB.
Means, you need to investigate the approach on your own.
Sure, if I get additional information, I will contact you. But for now, this is only what I can tell you.

Good Luck
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform