I have a JRDC server running attached to a MySQL db using java 8.0.19 connector.
Attempting to pass a query with a single parameter and I am getting below error.
Thank you for any assistance.
Error compiling program.
Error description: Cannot cast type: {Type=String,Rank=1, RemoteObject=True} to: {Type=Long,Rank=1, RemoteObject=True}
Error occurred on line: 83
If Parameters <> Null Then cmd.Parameters = Parameters
Word: parameters
Attempting to pass a query with a single parameter and I am getting below error.
Thank you for any assistance.
Error compiling program.
Error description: Cannot cast type: {Type=String,Rank=1, RemoteObject=True} to: {Type=Long,Rank=1, RemoteObject=True}
Error occurred on line: 83
If Parameters <> Null Then cmd.Parameters = Parameters
Word: parameters
B4A:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Type DBResult (Tag As Object, Columns As Map, Rows As List)
Type DBCommand (Name As String, Parameters() As Long)
Private const rdcLink As String = "http://192.168.0.200:17178/rdc"
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private Image_USOPENlogo As ImageView
Private Bgndpanel As Panel
Private lookupkey As String
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("2")
Get_badge
Bgndpanel.Color=Colors.Red
End Sub
Sub Get_badge
Dim req As DBRequestManager = CreateRequest
'Dim CMD As DBCommand= CreateCommand("get_badge,"178")
lookupkey=178
Dim CMD As DBCommand=CreateCommand("get_badge",lookupkey)
Wait For (req.ExecuteQuery(CMD, 0, Null)) JobDone(j As HttpJob)
If j.Success Then
req.HandleJobAsync(j, "req")
Wait For (req) req_Result(res As DBResult)
'work with result
req.PrintTable(res)
Else
Log("ERROR: " & j.ErrorMessage)
End If
j.Release
End Sub
Sub SpnrCountry_ItemClick (Position As Int, Value As Object)
End Sub
Sub SpnrCity_ItemClick (Position As Int, Value As Object)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub CreateRequest As DBRequestManager
Dim req As DBRequestManager
req.Initialize(Me, rdcLink)
Return req
End Sub
Sub CreateCommand(Name As String, Parameters() As String) As DBCommand
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = Name
If Parameters <> Null Then cmd.Parameters = Parameters
Return cmd
End Sub