I am looking at Dbutils .
I have a local database I want to copy it to the phone and use it.
I am just trying to display the records from the radio table.
I run it and it crashes.
What am I doing wrong here ?
B4X:
DBUtils.CopyDBFromAssets("cb.db")
DBUtils.ExecuteListView(SQL,"Select * From Radio",Null ,0,ListView1,False)
I have a local database I want to copy it to the phone and use it.
I am just trying to display the records from the radio table.
I run it and it crashes.
B4X:
at dalvik.system.NativeStart.main(Native Method)
** Activity (main) Create, isFirst = true **
Error occurred on line: 188 (dbutils)
mainafterFirstLayout (java line: 98)
java.lang.RuntimeException: Object should first be initialized.
at anywheresoftware.b4a.sql.SQL.checkNull(SQL.java:48)
at anywheresoftware.b4a.sql.SQL.ExecQuery(SQL.java:154)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:485)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:229)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at gdf.grantfullen.cbtipsandtricks.main.afterFirstLayout(main.java:98)
at gdf.grantfullen.cbtipsandtricks.main.access$100(main.java:16)
at gdf.grantfullen.cbtipsandtricks.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4938)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)