Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Move data from VB ADO to VFP table
Message
De
30/04/1999 14:10:29
 
 
À
30/04/1999 11:17:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00213673
Message ID:
00214029
Vues:
30
>SNIP
>>
>>It's possible in a couple of ways. An ADO recordset can be passed to an OLE Object in VFP 6, and viewed/manipulated in the object, or you can create an OLE object in VB, and call it from VFP to have it return a recordset object. Once VFP has the RS object, you can maniplate it from there using its properties and methods, or convert it to a dbf using your own routine, or one of several generic ones that are available as freeware.
>>
>>I hear ADO 2.1 has methods to save and restore RS objects to file. Using htese, you could save the RS to a file, and restore it from the file in VFP. I can't tell you the syntax, because I haven't used these methods yet.
>
>Thanks for the reply Eric. I need to toss this in, I am conveying this question for a coworker and am not actually doing it. But I did suggest to him an OLE object that he could use as you suggest.
>
>I thought he could use the VFPCOM.dll to this, but I need some concrete examples to appease him. I was hoping someone had done this and could speed up the investigation.
>
>I will have a look at the 2.1 save to file option.
>
>Thanks!
Hey Kendall,
I gather you already have your VB code that handles a recordset object. Well, whenever you feel is appropriate, save the recordset by using the save method myRS.Save "C:\PersRS.rs". Then, from VFP do:
oRS=CreateObject("ADODB.Recordset")
oRS.Open("C:\PersRS.rs")
? oRS.Fields(0).Name
? oRS.Fields(0).Value
Etc. Pretty straightforward, isn't it?
P.S. make sure you have the latest MDAC components.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform