I need to update several fields at the same time with a single query.
This is the code I have in the JRDC server file 'config.properties'.
And this is the code in B4A client.
B4X:
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("update_base_table", Array (col1,col2,col3,col4,col5,col6,col7,col8,col9,col10))
Dim j As HttpJob = CreateRequest.ExecuteBatch(Array(cmd), Null)
Wait For (req.ExecuteCommand(cmd,Null)) JobDone(j As HttpJob)
If j.Success Then
Log("Update successfully!")
Else
Log("ERROR: " & j.ErrorMessage)
End If
j.Release
If there is a way to execute the command in SQL, I would appreciate it, because this way it does not work
1) Why does "this way" not work? Any error messages?
2) I think your missing a parameter (specific to your case) when you are using CreateCommand. You're passing all the columns (col1..col10), but you are not passing a parameter for the id = ? part.
1) Why does "this way" not work? Any error messages?
2) I think your missing a parameter (specific to your case) when you are using CreateCommand. You're passing all the columns (col1..col10), but you are not passing a parameter for the id = ? part.
I already did it but it still does not work.
This way it seems to work, but it has a problem when it comes to updating the fields since it makes them in disarray.
What are you trying to say here? Are you using an ORDER BY clause to sort your displayed data? If not, why would you think a SELECT statement is obligated to return any order at all?
What are you trying to say here? Are you using an ORDER BY clause to sort your displayed data? If not, why would you think a SELECT statement is obligated to return any order at all?
Then both your config.properties and your client code is wrong (since the config.properties is wrong). BTW, next time post text instead of images (easier to copy/paste/quote).
Then both your config.properties and your client code is wrong (since the config.properties is wrong). BTW, next time post text instead of images (easier to copy/paste/quote).