Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO RecordSet without a connection
Message
De
28/01/2002 09:46:53
 
 
À
25/01/2002 17:41:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00609675
Message ID:
00611514
Vues:
21
A FoxPro array should work. Just throw in COMARRAY() in the mix:
ComArray(rs, 11)
Dimension aFlds(2), aVals(2)
aFlds(1) = "PID"
aFlds(2) = "StudentName"
aVals(1) = 1
aVals(2) = "Jim Smith"
rs.AddNew(@aFlds, @aVals)
HTH
>Thanks.
>
>Since this is in VB, how would I translate the "Array" function or do I just create a foxpro array?
>
>Dan
>
>>It's possible. See http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q196029
>>
>>>>
>>>>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
>>>
>>>
>>>Have you ever created an empty shape? Just today I was thing about using the MSHFlexGrid which requires a shape. I'm not using ADO to get the data so I thought about creating and empty shape and filling it from Fox cursors.
>>>
>>>Can that be done?
>>>
>>>Dan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform