Select to view content in your preferred language

Data types Recordset in VBScript - ArcPad 10

2767
1
07-19-2012 11:18 AM
DouglasCubin
New Contributor
All

I have a shapefile with unique IDs. These are LONG numbers such as:  200000874563  (numeric, precision 14)

My VBScript code is having problems reading this long number and actually returns:  -2147483648

So it looks like an overflow is happening.  Therefore a double would be nice or at least some way around this.

If I try something like:

       my_result =  CDbl(Recordset("UPRN").Value)

...in order to get a double (or even Cstr to get a string), then it still gives me the mega value of: -2147483648
I notice that when the Recordset reads the field, it automatically sets the my_result variable to type LONG.
Can i force my_result to be a DOUBLE in the script?
Thanks
Doug
Tags (3)
0 Kudos
1 Reply
DouglasCubin
New Contributor
This does seem to be a bug in fact. Will have to come up with a work around. Will probably alter the schema when it comes out of ArcView.  Basically, ArcPad VBScript doesnt read in the correct data type and initialises the variable as a LONG rather than a DOUBLE.
Perhaps fixed another time...
0 Kudos