Hi,
I have a B4a application where I have an edit box which is used for inputting a number (either manually or using a bar code scanner).
If I manually enter an incorrect number (ie it is not found in my database) my messagebox stating this was an incorrect number is displayed, I click on OK and everything is fine.
If I scan it, the message gets displayed, but when I click on OK, I get another message "Unfortunately, My Application has stopped".
Nothing shows in the log as an error.
This is my code:
Any ideas how to track this down?
I have a B4a application where I have an edit box which is used for inputting a number (either manually or using a bar code scanner).
If I manually enter an incorrect number (ie it is not found in my database) my messagebox stating this was an incorrect number is displayed, I click on OK and everything is fine.
If I scan it, the message gets displayed, but when I click on OK, I get another message "Unfortunately, My Application has stopped".
Nothing shows in the log as an error.
This is my code:
B4X:
Sub edtAWBLoadScan_TextChanged (Old As String, New As String)
If New.Length = 12 Then
Dim awb As String
awb = New.SubString2(0,11)
' pull the rest of the data from table
Dim m As Map
m = DBUtils.ExecuteMap(SQLLite, "SELECT rnd_pk, rnd_rnhfk, rnd_awbfk, awb_number, awb_pieces, cus_number,cus_company FROM RunSheetDetails WHERE awb_number = ?", Array As String(awb))
If m = Null OR m.IsInitialized = False Then
Msgbox("You have scanned/entered an Incorrect AWB#","Incorrect AWB#")
Else
'other code
End If
End If
End Sub
Any ideas how to track this down?