Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with SQL Transactions
Message
From
18/10/2001 05:30:35
 
 
To
17/10/2001 14:37:44
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00569685
Message ID:
00570108
Views:
22
Hi!

Forget to tell that you require to use sqlsetprop ( connobj.handle, “TRANSACTIONS”, 1 ) to use these T-SQL commands. What don't work? Didi you received error messages, or just got more than one transaction level? You can see how many levels of transaction are opened using @@TRANCOUNT SQL Server variable. To commit all levels of transactions at once (both opened by you and VFP automatically), you can run following script by SQLEXEC():
WHILE @@TRANCOUNT > 0
BEGIN
  COMMIT TRANSACTION
END
HTH.


>Thanks Vlad!!!
>
>The problem was there are several different handles. I modify my database to define that the remote views use the same handle (advanced options), and correct with this code:
>
>handl = sqlgetprop ( "connecthandle", "vpredios" )
>sqlsetprop ( handl, "transactions", 2 )
>..
>
>Also, i try the use of the TSQL instructions "BEGIN TRANSACTION", "COMMIT TRANSACTION" and "ROLLBACK TRANSACTION" but don't work!!!.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform