I have a problem when doing totals on my page. This is the error
java.lang.NumberFormatException: For input string: "13,686.63"
I just saw now that this converts doubles to a string !!! AM I BAD !!!
My code is very simple and I have kept the variables as doubles all the way thru. If you can let me know your comments , I would appreciate it.
Thank you
B4X:
Dim ttl As Double
Dim ra As ResultSet
ra= DB.Sql1.ExecQuery2("SELECT Ext_Price, USD_RAPP, InvNo FROM Invoice_footer WHERE InvNo = ? ", Array As String (NextInvNo))
Do While ra.NextRow
ttl = ttl + ra.GetDouble("USD_RAPP")
Loop
ttl=NumberFormat(ttl,0,2)
I thought so but I did not put that , As you can see the code I specified ttl as double and I read everything as double but when it added up it put the comma !!
Maybe I should make a new variable xyz as String and use that in the Final format .