Dim ID As Int
ID = 2
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("UPDATE_table", Array (edtName.Text,edtLastName.Text,ID))
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 Successefull")
Else
Log("ERROR Update" & j.ErrorMessage)
End If
j.Release
Delete
B4X:
Dim ID As Int
ID = 2
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("Delete_Row", Array (ID))
Dim j As HttpJob = CreateRequest.ExecuteBatch(Array(cmd), Null)
Wait For (req.ExecuteCommand(cmd,Null)) JobDone(j As HttpJob)
If j.Success Then
Log("Delete Row Successfull")
Else
Log("ERROR Delete Row " & j.ErrorMessage)
End If
j.Release
B4X:
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("Delete_table", Array (NameTable.Text))
Dim j As HttpJob = CreateRequest.ExecuteBatch(Array(cmd), Null)
Wait For (req.ExecuteCommand(cmd,Null)) JobDone(j As HttpJob)
If j.Success Then
Log("Delete Table Successefull")
Else
Log("ERROR " & j.ErrorMessage)
End If
j.Release
Dim ID As Int
ID = 2
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("UPDATE_table", Array (edtName.Text,edtLastName.Text,ID))
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 Successefull")
Else
Log("ERROR Update" & j.ErrorMessage)
End If
j.Release
Delete
B4X:
Dim ID As Int
ID = 2
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("Delete_Row", Array (ID))
Dim j As HttpJob = CreateRequest.ExecuteBatch(Array(cmd), Null)
Wait For (req.ExecuteCommand(cmd,Null)) JobDone(j As HttpJob)
If j.Success Then
Log("Delete Row Successfull")
Else
Log("ERROR Delete Row " & j.ErrorMessage)
End If
j.Release
B4X:
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("Delete_table", Array (NameTable.Text))
Dim j As HttpJob = CreateRequest.ExecuteBatch(Array(cmd), Null)
Wait For (req.ExecuteCommand(cmd,Null)) JobDone(j As HttpJob)
If j.Success Then
Log("Delete Table Successefull")
Else
Log("ERROR " & j.ErrorMessage)
End If
j.Release
Thanks. This is really helpful.
The DELETE works now (I'd got mixed up with arrays and brackets).
I'm still having problems with UPDATE, but I think this is unrelated ("values not bound to statement")