Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO sanity check...
Message
From
09/12/2002 11:09:33
 
 
To
08/12/2002 18:08:52
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00730767
Message ID:
00730928
Views:
15
>Just to make sure I'm on the right track still, how does this sound:
>
>I use ADO to get a record set from a SQL Server database (VFP7). I convert the RS to a cursor which I use for all the usual stuff in my code.
>
>Now the user modifies a record - do I search the RS for the matching record, change the appropriate field values, and do an update (of the whole record set)?
>
>Is there an easy way to delete and add a record to a RS?
>
>Thanks,
>Pat

Pat,

There's several approaches to this scenario, two of which that come to mind. The way you are doing it with the conversion, you may want to send individual record updates when the user submits them. (depends on the app) For individual updates I would recommend creating stored procedures in SQL that receive parameters for each field in your table, and a primary key value for a deletion. In this case the obtained rs would be discarded on the client.

The second approach will be to manipulate the ADO cursor as you are planning and do batch updates where the user may modify several records that are sent at the same time to the database. No stored procedures are needed here, and you don't need to send back all the retrieved rows, only the modified ones by filtering.

For more info do a search on MSDN for the "ADO Jumpstart for VFP" and visit http://www.able-consulting.com/ADO_Faq.htm
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform