Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PROBLEMS WITH TABLEUPDATE AND TRANSACTIONS
Message
 
À
18/05/1998 15:32:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00100182
Message ID:
00100262
Vues:
20
>Working with VisualFoxPro 5.0 I'm having trouble with this code:
>
>sqlexec( n, 'begin transaction' )
>select(1)
>tableupdate(.t.)
>select(2)
>tableupdate(.t.)
>sqlexec( n, 'commit transaction' )
>
>The problem is that seems to don't work ok the sqlserver transaction scheme because the commit rollback that works ok with one tableupdate creates rare behaviour with two or more tableupdates.
>
>Can you help me? Please?
>
>Thank you very much.
>Ricardo.

Hi Ricardo,

I have faced same problem and here is the solution.

When we connect with SQLCONNECT() we get unique connection handle. Each connection has AutoTransaction property (can be 1 or 2) which contains 1
by default. so whenever you issue TABLEUPDATE() it ends (commits) transaction on backend.

You can turn this off by issuing

SQLSETPROP(nHandle, "Transactions", 2)

See help of SQLSETPROP().

Bye
Jayesh
- Jayesh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform