Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with SQL Transactions
Message
From
17/10/2001 12:06:54
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Problem with SQL Transactions
Miscellaneous
Thread ID:
00569685
Message ID:
00569685
Views:
55
Actually we are developing a SQL application with a VFP Front End. In this application I use both remote views and SQL pass trough (SPT). To use SPT I develop a object named CONNOBJ that execute instructions, scripts, etc. I observe all the system works fine except for the manual transactions. I have a form using 4 remote views and I want to save to SQL server but using transactions. This is my code:

If sqlsetprop ( connobj.handle, “TRANSACTIONS”, 2 ) then
If tableupdate ( 2, .f., “VPREDIOS” ) then
If tableupdate ( 2, .f., “VHISCRED” ) then
Wait “Transaction Tests “ window
If tableupdate ( 2, .f., “VRECIBOS” ) then
If tableupdate ( 2, .f., “VDRECIBOS” ) then
* commit transactions
connobj.commit
else
* rollback transactions
connobj.rollback
endif
else
connobj.rollback
endif
else
connobj.rollback
endif
else
connobj.rollback
endif
else
connobj.rollback
endif
sqlsetprop ( connobj.handle, “TRANSACTIONS”, 1 )

I test my CONNSQL object outside of my program and the transactions works fine !!!. But when use in my form don’t work!!!. I try SQLSETPROP ( 0, …. ) and DBSETPROP() but still don´t work. For testing I disconnect my PC from the network between the TABLEUPDATE() instructions and I observe that SQL SERVER update my first tables without receiving the SQLCOMMIT.

Any Suggestions???

Sincerely and sorry for my bad english

Ing. Edmundo Rios Miranda
Estrategias Computacionales, SA de CV
Cuernavaca, Morelos, México
Escom@infosel.net.mx
Next
Reply
Map
View

Click here to load this message in the networking platform