Hi everyone
WELL I have taken the plunge and have started Working on our Android Hand held application
So far it is going ok we have 60% of the screen redone and working on the Zebra TC55 Hand held
But I am stuck on a function
In Windows Mobile I was allowed to have all my Database functions in one sub file and I could call them from any part of the program and update labels.
But in B4A its crashes if I try the following
And just so I know the code has worked I wanted to update the label2 on the b4XLegalCheck (and the Desgin screen is called LegalCheck) but when ever I try I crash the App
I have tried to use b4XLegalCheck.label2.text = "This is from the DB Sub" and I have tried LegalCheck.label2.text = "This is from the DB Sub" and nothing
I have even tried to do it as a Return function and that also crashes my app.
I would like to get this working as when I scan items and recall the data from the database the Product name is to be shown on label2 (example if I scan 50201600 then the App would show "Cadburys Cream Egg" on the label.
Does anyone know what I am doing wrong I can attach my full project if that helps as it is only forms at the moment and not much code.
WELL I have taken the plunge and have started Working on our Android Hand held application
So far it is going ok we have 60% of the screen redone and working on the Zebra TC55 Hand held
But I am stuck on a function
In Windows Mobile I was allowed to have all my Database functions in one sub file and I could call them from any part of the program and update labels.
But in B4A its crashes if I try the following
B4X:
Public Sub LegalCheck_FindIteminDatabase(BarcodeNumber As String)
Dim SQLCommand As String = ""
SQLCommand = SQLCommand + "Select "
SQLCommand = SQLCommand + "posdescription "
SQLCommand = SQLCommand + "from producttable "
SQLCommand = SQLCommand + "where barcodenumber='" + BarcodeNumber + "';"
End Sub
And just so I know the code has worked I wanted to update the label2 on the b4XLegalCheck (and the Desgin screen is called LegalCheck) but when ever I try I crash the App
I have tried to use b4XLegalCheck.label2.text = "This is from the DB Sub" and I have tried LegalCheck.label2.text = "This is from the DB Sub" and nothing
I have even tried to do it as a Return function and that also crashes my app.
I would like to get this working as when I scan items and recall the data from the database the Product name is to be shown on label2 (example if I scan 50201600 then the App would show "Cadburys Cream Egg" on the label.
Does anyone know what I am doing wrong I can attach my full project if that helps as it is only forms at the moment and not much code.