Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mysql can't find any TRANSACTION processing command !
Message
De
26/11/2000 21:39:31
 
 
À
22/11/2000 02:01:38
Stanley Yip
Shun Sang (technology) ltd Hong Kong
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00444497
Message ID:
00445548
Vues:
13
>I am using VFP connect with backend mysql server .
>In VFP have begin Transcation function.
>But in mysql I can't find any begin transaction function,commit and rollback function !
>
>Then does it mean only can use client side transcation processing ( VFP begin transaction command ).
>
>It is anyway to do on mysql ?

See the following:
Example of doing transactions

     How to do a transaction with MyISAM tables: 

     mysql> LOCK TABLES trans READ, customer WRITE;
     mysql> select sum(value) from trans where customer_id=some_id;
     mysql> update customer set total_value=sum_from_previous_statement
                where customer_id=some_id;
     mysql> UNLOCK TABLES;

     How to do a transaction with Berkeley DB tables: 

     mysql> BEGIN WORK; 
     mysql> select sum(value) from trans where customer_id=some_id;
     mysql> update customer set total_value=sum_from_previous_statement
                where customer_id=some_id;
     mysql> COMMIT;

     Note that you can often avoid transactions altogether by doing: 

     UPDATE customer SET value=value+new_value WHERE customer_id=some_id;
-- From http://www.mysql.com/information/presentations/presentation-oscon2000-20000719/index.html
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform