I want to display the values. I receive an error message
my code
and error is line 172 ==> Log(Cursor.GetInt("verb_number"))
B4X:
Waiting for debugger to connect...
Program started.
1
Number of rows = 17821
Cursor.ColumnCount ==> 3
verb_number
verb
verb_view
false
Error occurred on line: 172
java.sql.SQLException: ResultSet closed
at org.sqlite.RS.checkOpen(RS.java:63)
at org.sqlite.RS.findColumn(RS.java:108)
at org.sqlite.RS.getInt(RS.java:293)
at anywheresoftware.b4j.objects.SQL$ResultSetWrapper.GetInt(SQL.java:504)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:613)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:228)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:61)
at b4j.example.main$ResumableSub_get_verb_html.resume(main.java:183)
at b4j.example.main._get_verb_html(main.java:168)
at b4j.example.main._button1_click(main.java:161)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:613)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:231)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA$1.run(BA.java:215)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:748)
my code
B4X:
' db.db
'
' tbl_master
'
' verb_number int
' verb string
' verb_view in
Log("Number of rows = " & sql.ExecQuerySingleResult("SELECT count(*) FROM tbl_master"))
Dim Cursor As ResultSet
Cursor = sql.ExecQuery("SELECT * FROM tbl_master WHERE verb_number="&id)
Log("Cursor.ColumnCount ==> "& Cursor.ColumnCount )
Log(Cursor.GetColumnName(0))
Log(Cursor.GetColumnName(1))
Log(Cursor.GetColumnName(2))
Log(Cursor.NextRow)
Do While Cursor.NextRow
Log(Cursor.GetInt("verb_number"))
Log(Cursor.GetString("verb"))
Log(Cursor.GetInt("verb_view"))
Loop
Cursor.Close
Log(Cursor.GetInt("verb_number"))
Log(Cursor.GetString("verb"))
Log(Cursor.GetInt("verb_view"))
and error is line 172 ==> Log(Cursor.GetInt("verb_number"))