Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wrapping all SQL updates into one transaction
Message
De
12/01/2000 13:17:21
 
 
À
12/01/2000 10:47:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00315804
Message ID:
00317115
Vues:
12
>What time frame are we talking about? Five, ten, fifteen minutes, etc....

I'm not sure what the value is.

>>I checked on our SQL Server and it's configured with "remote conn timeout" @ 10 min. However, when I ran a test, canceled it in the middle of the process, and let the connection idle for about 15 min., then used ISQL/W to query on the records. They appeared to be locked and unavailable. BTW, I'm the only one who's using this database.

Leaving the connection idle is not the same thing as having it dropped. What happens if you pull the network cable on the client. That makes for much better experiment.

>>I then SQLDISCONNECT() to free those records and found out that SQL did not rollback those record updates I made prior to cancellation, which was before the code where it does SQLCOMMIT/SQLROLLBACK. How come?

It appears that either VFP or ODBC issuing a commit when a disconnect happens. I'm guessing that it's ODBC but I'd have to wade through an ODBC trace to find out. I used the profiler to see what was happening and right before the disconnect, the following command came through:

IF @@TRANCOUNT > 0 COMMIT TRAN

Again, an explicit disconnect does not simulate what you want. Trying pulling the network cable on the client.

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform