Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO and VFP
Message
 
À
20/03/2000 01:29:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00347771
Message ID:
00347835
Vues:
17
Yes, you can use SQL Updates and Deletes. All you need is a way to uniquely ID the record you wish to update. Most of the time, you will use the primary key. Whether you choose to render the SQL from the client to server via a string or whether you choose to use stored procedures, you will need to use the ADO Command Object. The October, 1999 FoxPro Advisor has an article I wrote that goes into detail on how to use the ADO Command Object. Alternatively, you can go to my website: www.mainlinesoftware.com and pull down ADO Jumpstart for VFP Devlelopers Whitepaper in Adobe Acrobat Format (PDF File).

Personally, I am not a fan of updating data through the recordset object. This is when you need to navigate to the correct record in order for the updates to take effect. You have two basic choices. First, you can have what is similar to record buffering, one record can be updated at a time. This is what the Update Method is far. Alternatively, you can have something similar to Table Buffering, the ability to update batches of records. With the latter, you would want to combine updating batches of records with a transaction. When you update from a recordset, behind the scenes, an update statement is ultimately what is executed. With a stored procedure, you make this an explicit action as opposed to an implicit action, and therefore, have more granular control.



>Dear all,
>
>I going through ADO documentation. I am a bit confused here. For example to update a record you have to issue the "select" statement and navigate to the record and change the value of the record before issue the "update" command and the same goes for the delete. Can someone tell me if this is the right way? What happen to the SQL syntax of "Update" and "Delete", Can't it be used in anywhere within the ADO? Thanks.
>
>Regards,
>Kueh.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform