Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Disconnected Recordsets
Message
De
05/09/2002 20:31:08
 
 
À
05/09/2002 17:28:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00696663
Message ID:
00697317
Vues:
15
Thanks for the reply.

Well, I've found a few interesting things when trying to use the Microsoft VFPCOM utility. First, when I create a recordset based on the Northwind!Employees table (select * from employees), the RSToCursor() converts all of the fields as type General!? However if I use the OleDbFox util everything is fine.

Second, if I edit the values in the cursor created by the OleDbFox util, then use the VFPCOM utility to convert CursorToRS(), the recordset gets appended with the whole set of data. It even autoincrements the EmployeeID field. This is interesting to me because the readme_VFPCOM.asp file under CursorToRS() Remarks clears states: "The method will overwrite any existing recordset contents." It raises hope that the VFPCOM util might update the recordset correctly, if only the RSToCursor() function didn't throw everything into General fields...

I guess I'm just getting lazy. With all the talk about ADO recordsets and how great they are (not necessarily here, but all the MS stuff I've been reading, mag articles, etc.), I would have thought that the Microsoft VFPCOM util would faciliate all this.

Maybe I should play with XML instead...


- Brian



>The recordset needs to have been obtained from the source in order for it to be updatable. It can probably be done by the conversion routine, but a snapshot of all the metadata information has to be saved so that a recordset can be rebuilt from it with all the properties from the source. Maybe you can contact the author of this utility and ask him to consider it.
>
>If you want to do it without writing a file to disk, it can be done by using the same source but with a fake filter that would evaluate to a false and the result will be an empty recordset. You then take your data and populate this recordset with it. I've done this only for adding records and it works well, but in your case that's probably the same as just updating the original recordset itself without converting.
>
>Working with the original recordset is not so bad either, unless you are editing a large amount of records. For small recordsets the differences might very well be negligible. Just my .02


VFP6 SP5, VFP8 SP1, VFP 9 SP 1 and Win XP SP 3 (unless otherwise specified)


www.wulfsden.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform