Hi strugle with a problem that it's really dirve me crazy?
my app made of layout with a Listview I made a sql declare ir intialize it but when I run program it give me some eror I've been working on it for 10 days and 8 hrs per day but I couldnt solve it becuse im not programer please guide me in easiest way that posible .
I tested my code step by step and this part is problem :
and it's shows me these Erors when I run :
my app made of layout with a Listview I made a sql declare ir intialize it but when I run program it give me some eror I've been working on it for 10 days and 8 hrs per day but I couldnt solve it becuse im not programer please guide me in easiest way that posible .
I tested my code step by step and this part is problem :
MainListBtn_Click that open layout and it's listview:
Sub MainListBtn_Click
Activity.RemoveAllViews
Activity.LoadLayout("laycontent")
Dim Cur As Cursor
Dim strContentList As String
Dim sqlDB As SQL
Cur = sqlDB.ExecQuery ("Select * FROM tblContent")
For i = 0 To Cur.RowCount -1
Cur.Position = i
strContentList = Cur.GetString("ContentList")
contentListView.AddSingleLine2 (strContentList,i)
Next
endsub
'contentListView.SingleLineLayout.Label.TextColor = Colors.Black
End Sub
and it's shows me these Erors when I run :
Error occurred on line: 113 (Main)
java.lang.RuntimeException: Object should first be initialized.
at anywheresoftware.b4a.sql.SQL.checkNull(SQL.java:55)
at anywheresoftware.b4a.sql.SQL.ExecQuery(SQL.java:210)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:205)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:7448)
at android.view.View.performClickInternal(View.java:7425)
at android.view.View.access$3600(View.java:810)
at android.view.View$PerformClick.run(View.java:28309)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7697)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)