Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO RecordSet without a connection
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00609675
Message ID:
00610856
Vues:
16
>I am trying to create a recordset to pass data to a DLL. The problem is that I need to populate the recordset before connecting to the data source (the DLL does the connecting).
>
>I've tried different things but cannot open the recordset without a connection.
>
>Am I missing something or can this not be done?
>
>TIA,

Here is a simple example of doing this:
This.oDetlRS = CreateObject("ADODB.Recordset")
With This.oDetlRS.Fields
	.Append("FileName", adChar, 15)
	.Append("Process_id", adInteger)
EndWith
This.oDetlRS.Open
After this you can use AddNew to populate the recordset.

If you would rather use a batch update, you need to persist an empty recordset obtained from the backend so that you won't need a connection in order to open and populate the rs at the client, and when you send it to the DLL you can BatchUpdate all rows at once. HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform