Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Disconnected Recordsets
Message
From
06/09/2002 09:51:41
 
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00696663
Message ID:
00697484
Views:
19
There is another conversion tool here in the downloads that you might want to give a try, it's file #9916. It is based in the original rs2dbf conversion in public circulation (by Ken Levy) There is source code in here, so you could let yourself run wild and put any modification for your use.

>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform