I am trying to get it working but there are too many links and I get confused. I use the jrdc2 server example after changing the config.properties file to deal with animals (comment and uncomment the existing code). Used the attached code from another link for b4a client:
There was no table creation code so I added it but I get:
I don't understand what is missing.
Is my code correct ?
Can I have one example that is closed on itself with MySQL that works on my PC ?
Thanks.
B4X:
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
reqManager.Initialize(Me, "http://192.168.0.180:54025/rdc")
End If
Activity.LoadLayout("1")
' Dim cmd As DBCommand
' cmd.Initialize
' cmd.Name = "create_table"
' reqManager.ExecuteCommand(cmd,"create")
End Sub
Sub btnSelect_Click
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = "select_animal"
reqManager.ExecuteQuery(cmd, 0, Null)
End Sub
Sub JobDone(Job As HttpJob)
If Job.Success = False Then
Log("Error: " & Job.ErrorMessage)
Else
If Job.JobName = "DBRequest" Then
reqManager.HandleJobAsync(Job, "ReqManager")
End If
End If
Job.Release
End Sub
Sub ReqManager_Result(result As DBResult)
reqManager.PrintTable(result)
End Sub
There was no table creation code so I added it but I get:
in B4j and B4a programs.Class not found: b4a.example.main$_dbcommand, trying: b4j.example.main$_dbcommand
Class not found: b4j.example.main$_dbresult, trying: b4a.example.main$_dbresult
I don't understand what is missing.
Is my code correct ?
Can I have one example that is closed on itself with MySQL that works on my PC ?
Thanks.