Application behaves differently in PPC

mozaharul

Active Member
Licensed User
Hi,

I’m running the program in desktop and in PPC in gives error message only in PPC. The message happens with the lost focus of a test box. The message is like :

“An error occurred on sub_txtname_ lostfocus
FormatException
Continue ?”

The code for the sub_txtname_ lostfocus is :

Sub txtname_LostFocus ' Mother entred before child and checking the sex against the mother-number entred.
If txtmn.Text > 0 AND txtmn.Text < txtmemno.text Then
mperid=txthhidm.Text*100 + txtmn.Text ' mperid is a global variable to hold run-time generated mother's perm_pid.
cmd.CommandText="select name,sex,dob,perm_pid from member where perm_pid ="&mperid&""
cmd.ExecuteTable("table15",0)
sexmother = table15.Cell("sex",0)
If sexmother = 1 Then
Msgbox("Wrong mother number '" & table15.cell("name",0) & "' is male, so cannot be mother")
txtmn.Text=""
txtmn.Focus
Return
Else
i=Msgbox ("Is ' " & table15.Cell("name",0) & " ' the mother of ' "& txtname.Text&" ' being entered now?","Mother of Member",cmsgboxyesno,cmsgboxquestion)
If i=cyes Then
cmbsex.Focus
Return
Else
txtmn.Focus
Return
End If
End If
End If
End Sub

I know that only the above lines are not enough to make sense. But expecting help.


regards,
 

agraham

Expert
Licensed User
Longtime User
Debugging on a PPC is much more difficult than on the desktop. You can find which line is giving the error by putting lines such as "msgbox("line 23") at one or more places in your code or use the Tracer object in my debug library http://www.b4x.com/forum/additional-libraries/2328-debug-library.html to output trace messages to a separate window. You can then edit and run your code, altering the position and content of these messages, on the device and so get some indication as to what is happening.
 
Top