I use jrdc2-b4j connection MSSQL
But there is no update process in the example
How should i write
my db:
in config.properties:
My code , it has Errors
But there is no update process in the example
How should i write
my db:
in config.properties:
B4X:
sql.update_app=update animals set kg=? where id=?
B4X:
B4X:
Sub UpdateRecord(kg As String,id As Int)
Dim cmd As DBCommand = CreateCommand("update_app", Array(kg,id))
Dim j As HttpJob = CreateRequest.ExecuteBatch(Array(cmd), Null)
Wait For(j) JobDone(j As HttpJob)
If j.Success Then
Log("Inserted successfully!")
Else
Log("error:" & j.ErrorMessage)
End If
j.Release
End Sub
Sub Button2_Click
UpdateRecord(EditText3.Text,EditText1.Text ) ''Text3 is kg, text1 is id
End Sub