I have check "Remote Database Connector" Routine but I am getting error message.Please check blow log error and my code....
Log Error:-
Error occurred on line: 2251 (Table)
java.lang.IllegalArgumentException: Not an array: class anywheresoftware.b4a.objects.collections.Map$MyMap
at java.lang.reflect.Array.notAnArray(Array.java:43)
at java.lang.reflect.Array.get(Array.java:101)
at anywheresoftware.b4a.shell.ArraysUtils.getElement(ArraysUtils.java:76)
at anywheresoftware.b4a.shell.Shell.getArrayElement(Shell.java:566)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:372)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA$2.run(BA.java:328)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5624)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
** Activity (main) Resume **
PackageAdded: package:com.google.android.apps.plus
PackageAdded: package:com.sbi.SBIFreedomPlus
Soure Code :-
Sub LoadGrid(Query As String)
Dim job3 As HttpJob
job3.Initialize("Job3", Me)
'job.PostString(StrURLPath & "RemoteDB/LoadReportName.asp?Month="&Query&"","")
job3.PostString(StrURLPath & "Android/FrmRemoteSQL.aspx",Query)
ProgressDialogShow("Calling KHARIND server...")
End Sub
Sub JobDone (Job As HttpJob)
If Job.Success Then
Dim parser As JSONParser
Dim response As String = Job.GetString
parser.Initialize(response)
Dim rows As List
Dim m As Map
rows = parser.NextArray
'work with result
'rows is a List. Each item is a Map with the columns names as keys and the db values as the values.
If Job.JobName = "Job1" Then
For i = 0 To rows.Size - 1
Log("Rows #" & i)
Dim m As Map
m = rows.Get(i)
Log("col1=" & m.Get("Statement")) 'log the values of col1 and col2
LstReports.AddSingleLine(m.Get("Statement"))
Next
else if Job.JobName = "Job2" Then
For i = 0 To rows.Size - 1
Log("Rows #" & i)
Dim m As Map
m = rows.Get(i)
Log("col1=" & m.Get("Query")) 'log the values of col1 and col2
LoadGrid(m.Get("Query"))
Next
else if Job.JobName = "Job3" Then
For i = 0 To rows.Size - 1
Log("Rows #" & i)
m = rows.Get(i)
Log("col1=" & m.Get("Query")) 'log the values of col1 and col2
Next
Table2.Initialize(Me, "Table2")
Table2.AddToActivity(Activity, 10dip, 250dip, 300dip, 200dip)
Table2.LoadRDCResult(m,rows,True)
End If
End If
Job.Release
ProgressDialogHide
End Sub