General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Updating sql-server data in a transaction
Hi,
What is the standard solution for updating of stock (f.e. quanties), or updates of credit limits ... within a manual transaction
begin transaction && VFP
updating stock via SQLEXEC()
tableupdates of views
sqlcommit
end transaction
f.e. billing
master (customer, date, ...)
detail (article#, quantity, price, ...)
stock (article#, place, stock quantity, ...)
When the invoice is saved, I want to reduce stock. All records of the actual detail view (set deleted off) are processed and the stock quantity is reduced. Is the only way to reduce stock (inside the begin transaction, sqlcommit and end transaction) to send SQLEXEC (INSERT INTO, UPDATE INTO ...) statements? The use of additional updatable views isn't possible (requery isn't allowed when transaction is in progress).
What is a other possible solution for that case ?
Bye,
-Andreas
Next
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