Walter Meester
HoogkarspelNetherlands
General information
Category:
Coding, syntax & commands
Kevin,
I still don't have an answer to this question:
One additional question that came to mind and no-one answered for me.
If I've got an order with several orderlines and I want to commit the order into one transaction. How would you implement that with SPs ?
In VFP I would use remote views and do something like:
INSERT INTO Orders (....) VALUES (....)
INSERT INTO Orderlines (.....) VALUES (....)
INSERT INTO Orderlines (.....) VALUES (....)
INSERT INTO Orderlines (.....) VALUES (....)
INSERT INTO Orderlines (.....) VALUES (....)
SQLSETPROP(Applic.SqlHandle,"transActions",2) && Manual Transaction
BEGIN TRANSACTION
IF TABLEUPDATE(2,.T.,"Orders") AND TABLEUPDATE(2,.T.,"OrderLines") AND SQLCOMMIT(Applic.SqlHandle) > 0
ENDTRANSACTION
ELSE
SQLROLLBACK(Applic.SqlHandle)
ROLLBACK
ENDIF
SQLSETPROP(Applic.SqlHandle,"transActions",1) && Automatic Transaction
How would YOU implement this with SPT ?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only