I have a details activity where I try to retrieve single record from SQLite.
There are no errors on compilation but when I run the App no data is displayed.
The Listview code works fine and looks like this:
The "IssueDetails" activity is called upon selection
the second issue (question) I have how would I handle TEXT type fields ?
In the code above the Lavel 'strSymptoms' need to display MEMO like field with multiple lines. Wne I enable this line I get strange error:
strSymptoms = Cur.GetString(\
javac 1.6.0_26
src\com\dps\EssentialDatabase\issuedetails.java:403: inconvertible types
found : java.lang.String
required: android.widget.TextView
mostCurrent._strsymptoms.setObject((android.widget.TextView)(mostCurrent._cur.GetString("Symptoms")));
I also tried to use
but cannot figure out the proper use :-(
any help appreciated
Arthur
There are no errors on compilation but when I run the App no data is displayed.
The Listview code works fine and looks like this:
B4X:
Sub ListViewFill
ListView1.Clear
Cur = SQL1.ExecQuery(QueryString)
For i = 0 To Cur.RowCount - 1
Cur.Position = i
ListView1.AddSingleLine(Cur.GetString("IssueName"))
Next
Cur.Close
End Sub
Sub ListView1_ItemClick (Position As Int, Value As Object)
ItemSelected = Value
Main.IssueID =Position
StartActivity("IssueDetails")
'CallSubDelayed2(IssueDetails, "LoadDatabase",Cur.Position)
End Sub
The "IssueDetails" activity is called upon selection
B4X:
Sub LoadDatabase(Dir As String, FileName As String)
Cur.Position = Main.IssueID
QueryString="SELECT ID, IssueName, FROM issues WHERE ID = "&Main.IssueID
Cur = SQL1.ExecQuery(QueryString)
strIssueName.Text = Cur.GetString("IssueName")
Msgbox(strIssueName.Text,"Issue ID")
'strSymptoms = Cur.GetString("Symptoms")
'ImageView_Bitmap = LoadBitmap(File.DirAssets, Cur.GetString("Image"))
Cur.Close
End Sub
the second issue (question) I have how would I handle TEXT type fields ?
In the code above the Lavel 'strSymptoms' need to display MEMO like field with multiple lines. Wne I enable this line I get strange error:
strSymptoms = Cur.GetString(\
javac 1.6.0_26
src\com\dps\EssentialDatabase\issuedetails.java:403: inconvertible types
found : java.lang.String
required: android.widget.TextView
mostCurrent._strsymptoms.setObject((android.widget.TextView)(mostCurrent._cur.GetString("Symptoms")));
I also tried to use
B4X:
CallSubDelayed2(IssueDetails, "LoadDatabase",Cur.Position)
but cannot figure out the proper use :-(
any help appreciated
Arthur
Last edited: