Here is your example using locale.library to convert the numbers to the correct format. This should work with all languages. num is a locale.library Numeric object.
B4X:
num.New1
Dim totNr,totStr,mynumber As String
totStr="38,8"
Msgbox(totStr,"Foutmelding",cMsgboxOK,cMsgboxHand)
mynumber=textbox1.Text ' mynumber ="45,7"
Msgbox(mynumber,"Foutmelding",cMsgboxOK,cMsgboxHand)
' this goes wrong result=-69 instead of -6,9
totNr=num.Parse(totStr)-num.Parse(mynumber)
Msgbox(totNr,"Foutmelding",cMsgboxOK,cMsgboxHand)
If it is possible you shouldn't use REAL as data type in sqlite. There is no advantage in doing so as all columns are internally created as strings so use datatype TEXT. The problem with B4PPC is that if you select a number from a REAL column, you will get it in localized form and you have to convert it to the correct form for yourself.