Hello Community !
I loop through a list and depending on the values I update a table in the database.
I will make an example:
On server-side, I have the following sql-command:
sql.updateorders= Update orders set paid = ? where (id= ?)
Now I want to react on the "update_orders" command in the ReqManager
because I want to have the sum of the entries with the paymentid. The problem
is, because I use a loop, the ReqManager always reacts on every "update_orders"
command.
Is it possible to use a reliable way to get the sum after the last update-entry ?
Regards
h725
I loop through a list and depending on the values I update a table in the database.
I will make an example:
B4X:
dim paymentid as int
Dim List1 As List
List1.Initialize
List1.AddAll(Array As Int(3,6,9))
For i = 0 To List1.Size - 1
Dim number As Int
number = List1.Get(i)
Dim cmd2 As DBCommand
cmd2.Initialize
cmd2.Name = "update_orders"
cmd2.Parameters = Array As Object(paymentid,number)
reqManager.ExecuteCommand(cmd2, "update_orders")
Next
Next
On server-side, I have the following sql-command:
sql.updateorders= Update orders set paid = ? where (id= ?)
Now I want to react on the "update_orders" command in the ReqManager
because I want to have the sum of the entries with the paymentid. The problem
is, because I use a loop, the ReqManager always reacts on every "update_orders"
command.
Is it possible to use a reliable way to get the sum after the last update-entry ?
Regards
h725