Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating sql-server data in a transaction
Message
De
13/10/2001 21:51:12
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00567928
Message ID:
00568239
Vues:
17
This message has been marked as a message which has helped to the initial question of the thread.
Andreas,

I'd use remote views for all three of your tables, vMaster, vDetail and vStock, with Optimistic Table Buffering. When the invoice is saved:

SQLTransaction
Tableupdates of all three views
SQLCommit

Don't use the VFP transaction ... it's not necessary since you've got the SQL Transactions.

HTH,
~~Bonnie



>Hi,
>
>What is the standard solution for updating of stock (f.e. quanties), or updates of credit limits ... within a manual transaction
>
>begin transaction && VFP
> updating stock via SQLEXEC()
> tableupdates of views
>sqlcommit
>end transaction
>
>f.e. billing
>
>master (customer, date, ...)
>detail (article#, quantity, price, ...)
>stock (article#, place, stock quantity, ...)
>
>When the invoice is saved, I want to reduce stock. All records of the actual detail view (set deleted off) are processed and the stock quantity is reduced. Is the only way to reduce stock (inside the begin transaction, sqlcommit and end transaction) to send SQLEXEC (INSERT INTO, UPDATE INTO ...) statements? The use of additional updatable views isn't possible (requery isn't allowed when transaction is in progress).
>
>What is a other possible solution for that case ?
>
>Bye,
>-Andreas
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform