Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seeking a brilliant idea to replace NextID() function
Message
 
To
21/01/2008 13:31:04
Suhas Hegde
Dental Surgeon
Sirsi, India
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01283680
Message ID:
01283759
Views:
10
>>>Do you need SQLSETPROP(oApp.oVar.sqlHandler,"Transactions",DB_TRANSMANUAL)
>>>
>>>Suhashegde
>>
>>Yes, if you want to save ALL records or none.
>>
>>About 90% of time the user works with ONE table, that is why I leave TRANSACTIONS to be AUTOMATIC. but In that class I need to save either ALL records either NONE of them.
>
>Then what would SQLEXEC(handle,"Commit Transaction") DO ?

Just commit all changes I sent back to SQL Server.
This is something like:
BEGIN TRANSCATION
* Make Change in Table1
* Make Change in Table2
* Make Change in Table3
.....
* Make Change in TableN
IF SomethingNotGood
   ROLLBACK && Roll back ALL changes made in ALL tables
ELSE
   COMMIT && We have success. The save ALL changes.
ENDIF
in VFP.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform