I'm so frustrated right now I'm about to scream. I've added a column to my database that contains either a Yes or No I've added some code to my code to retrieve the data along with the new column. I want to test the new column and if Yes the program will load a picture. If I set the idc variable to Yes and don't do the m.get the pictures loads fine It seems like the m.get command doesn't do anything. If I put a pause on it the program stops and then shuts down with the log error "OutOfMemoryError" Code as follows:
I've tried the if statement with the variable and also with a "Yes" but nothing works I've even tried to load a label with the results of the m.get command but when the program hits that comment it stops and the program shut down the error I get in the log is java.lang.outofmemoryerror.
Why is it every time I try and make some small change it takes me hours of trying everything I can think of and then I come to you guys for help.
I've looked at the database and see that there is a Yes or No in the record, and the column name is ActCert text.
B4X:
Sub sv_ItemClick(Value As String)
Dim id As String
Dim idc As String
Dim VYes As String
Dim m As Map
Dim Val() As String
id = 0
VYes = "Yes"
LblFName.Visible = True
lblDJoined.Visible = True
lblbdate.Visible = True
lblassoc.Visible = True
lblpaid.Visible = True
imgview.Visible = True
lblsign.Visible = True
btnAssoc.Visible = True
btnFLName.Visible = True
m.Initialize
Val = Regex.Split(",", Value)
m = DBUtils.ExecuteMap(SQL1, "SELECT mbr_first_name, mbr_last_name, address_1, city, state, zip_code, e_mail, home_phone, datej, description, birthd, duesp, assc_last_name, assc_first_name, mbr_prox, assoc_prox, reldate, ActCert FROM mbrs where mbr_number = ?", Array As String(Val(0)))
If m.IsInitialized = True Then
id = m.Get("mbr_prox") ' load mbr prox into i
idc = m.Get("ActCert") ' check for range certified
If idc = VYes Then
imgCert.Visible = True
picture = LoadBitmap(File.DirRootExternal,"TCGCPhotos/Rangecert.jpg")
imgCert.SetBackgroundImage(picture) ' this will set picture
Else
imgCert.Visible = False
End If
If File.Exists(File.DirRootExternal,"TCGCPhotos/"&id&".jpg") = True Then
picture = LoadBitmap(File.DirRootExternal,"TCGCPhotos/"&id&".jpg") 'this will load picture
imgview.SetBackgroundImage(picture) 'this will set picture
Else
picture = LoadBitmap(File.DirRootExternal,"TCGCPhotos/Noimages.jpg")
imgview.SetBackgroundImage(picture)
End If
btnFLName.Text = m.Get("mbr_first_name") & " " & m.Get("mbr_last_name")
lblAddress.Text = m.Get("address_1")
lblCSZ.Text = m.Get("city") & ", " & m.Get("state") & " " & m.Get("zip_code")
lblPhone.Text = m.Get("home_phone")
lblStatus.Text = m.Get("description")
lblEmail.Text = m.Get("e_mail")
lblJoined.Text = m.Get("datej")
lblBirth.text = m.Get("birthd")
lblduespaid.Text = m.Get("duesp")
btnAssoc.Text = m.Get("assc_first_name") & " " & m.Get("assc_last_name")
lblrel.Text = m.Get("reldate")
End If
End Sub
Why is it every time I try and make some small change it takes me hours of trying everything I can think of and then I come to you guys for help.
I've looked at the database and see that there is a Yes or No in the record, and the column name is ActCert text.
Last edited: