Bug? Get Different Result in Debug(Rapid) vs Debug(legacy) or Release Mode

Richard Goh

Active Member
Licensed User
Longtime User
Hi, I am not sure is this a bugs or what. I created a field in sqllite table using REAL type to store date Ticks value. My program will encountered error (on java.lang.NumberFormatException: Invalid long: "1.38324e+12".) when I run it in Release or Debug(Legacy) mode. But there is no error in Debug(Rapid) mode. I know my mistake to use REAL as a date type so i had changed my type to use String for the date field. Anyway it's just to raised up my discovery.
 
I've tried this code:
Code: Copy
Dim l As Long = "1.38324e+12"
Log(l)
It worked fine in both modes. Can you try it?

I'm not sure is it due to the select function I used? I'm using DB functions below to retrieve my record into Maps. Then using maps.GetValueAt(columnNo) to get value out.

Code: Copy
Sub ExecuteMap(SQL As SQL, Query As String, StringArgs() As String) As Map
    Dim cur As Cursor   
        If StringArgs <> Null Then
            cur = SQL.ExecQuery2(Query, StringArgs)
        Else
            cur = SQL.ExecQuery(Query)
        End If
        Log("ExecuteMap: " & Query)
        If cur.RowCount = 0 Then
            Log("No records found.")
            Return Null
        End If
        Dim res As Map
        res.Initialize
        cur.Position = 0
        For i = 0 To cur.ColumnCount - 1
            res.Put(cur.GetColumnName(i).ToLowerCase, cur.GetString2(i))
        Next
    cur.Close
    Return res
End Sub
 
Back
Top