I have been using:
to retrieve a column from an (open) database/table.
I was reviewing the unfiltered logs and see:
Is this an error or something that is generated every time you access a named column instead of an indexed column in a cursor?
Rusty
B4X:
Dim AnsTxt As String
AnswerCursor.Position = 0
AnsTxt = AnswerCursor.GetString("Answers.AnswerText")
I was reviewing the unfiltered logs and see:
for every column retrieved with .getstring("columnname") instead of .getstring2(columnindex)requesting column name with table name -- Answers.AnswerText
java.lang.Exception
at net.sqlcipher.database.SQLiteCursor.getColumnIndex(SQLiteCursor.java:315)
at net.sqlcipher.AbstractCursor.getColumnIndexOrThrow(AbstractCursor.java:284)
at android.database.CursorWrapper.getColumnIndexOrThrow(CursorWrapper.java:78)
at anywheresoftware.b4a.sql.SQL$CursorWrapper.GetString(SQL.java:355)
at talkingsurvey.b4a.survey.main._qdisplay(main.java:8706)
at talkingsurvey.b4a.survey.main._displayquestions(main.java:16803)
at talkingsurvey.b4a.survey.main._vv_complete(main.java:18769)
at talkingsurvey.b4a.survey.main._btnvvstop_click(main.java:18595)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:708)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:340)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:157)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:153)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:78)
at android.view.View.performClick(View.java:4487)
at android.view.View$PerformClick.run(View.java:18746)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
at dalvik.system.NativeStart.main(Native Method)
Is this an error or something that is generated every time you access a named column instead of an indexed column in a cursor?
Rusty