Hej S�ren,

If you subtract 2^32 from 2.612.390.773, you get -1.682.576.523.

I think it's just a question of MapInfo "just" reading the first 4 bytes (32
bits) in LSB manner, ignoring the higher order bytes.

MapInfo cannot handle larger integer values than +/- 2^31, so you _have_ to
handle it in MS/SQL, e.g. by converting to float (in a view) as you've done.
A MapInfo float has 15-16 significant digits, so you should be ok.

If it's essential to handle 10+ digits integers in MapInfo, you have to
write your own routines to do so. I recall seeing it done somewhere, but the
place eludes me right now ....

Best regards / Med venlig hilsen
Lars V. Nielsen
--------------------------------------------------------
Hvenegaard & Meklenborg
Rugaardsvej 55, DK-5000 Odense C
Denmark
http://www.hvm.dk
----- Original Message -----
From: "S�ren Breddam" <[EMAIL PROTECTED]>
To: "MapInfo-L (E-mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, February 25, 2004 11:31 PM
Subject: MI-L Wrong default types in linked DBMS table


> Hi,
>
> I've come across a very odd problem with linked tables from a SQL Server.
It
> seems as if MI (7.0) can't import the bigger numbers or assign the right
> column type when i try to link a table with 10 digit numbers in a column.
> The table is by default linked with the column type Integer and therefore
> larger numbers than 2.147.483.647 are imported totally wrong. Those values
> are converted from e.g 2.612.390.773 to -1.682.576.523 (sic!)
> When I used the SQL Expert to import the table and used the SQL function
> CAST(MyColName As Float) (or char...) everything was fine but it was a
> nuisance to write all the cols in the SQL Expert.
> Can anyone shed some light over this and tell me why MI can't assign a
float
> type to the column by default?
>
> TIA
> Regards
>
> S�ren Breddam
> GIS- og IT-koordinator
> Teknik og Erhvervsforvaltningen
> Stevns Kommune - www.stevns.dk
> * Tlf.: 5656 1800
> * Dir.: 5656 1891
>
>
>
> ---------------------------------------------------------------------
> List hosting provided by Directions Magazine | www.directionsmag.com |
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> Message number: 10600
>
>
>


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 10605

Reply via email to