Hi Fabio,
Thre's discussion about ODBC and SQL Server bigint in
Re: Inserting integer values in BIGINT fields in view Thread #
600757. According to
Visual FoxPro System Capacities VFP integers have range from -2,147,483,647 to 2,147,483,647. -2,147,483,648 is out of this range. The currency value of -922337203685477.5808 is also out of VFP currency range(
-$922337203685477.5807 to $922337203685477.5807).
>Hi
>
>VFP INTEGER range and CURRENCY range not support full SQL data ranges.
>SQL BIGINT what becomes ?
>
>Then, I aspected some type of conversion or error.
>
>Surprise!
>
>This T-SQL command build a local cursor, never error occurs:
>
>SELECT
> -2147483647 intdefault
>, -2147483648 intdefnosup
>, CONVERT(INT,-2147483648) intforced
>, {fn CONVERT(-2147483648,SQL_INTEGER)} intodbc
>, -9223372036854775808 bigint
>, convert(money,-922337203685477.5807) monOk
>, convert(money,-922337203685477.5808) monForced
>
VFP CURSOR
>field | value | type
>-------------------------------------------
>intdefault | -2147483647 | I
>
>OK
>
>--------------------------------------------------------------------
>intdefnosup| -2147483648 | N(12,0)
>
>one dangerous choice;
>why not integer field type, like intforced ?
>
>-------------------------------------------
>intforced | *********** | I
>
>a char str() format overflow written on a data field.
>VFP uses define Cursor values for store this.
>If uses intforced, format is copied on variable,
>but put it on field is impossible.
>
>If exec:
>REPLACE intodbc WITH intodbc
>it is obtained error 39.
>
>We have gone in baby food!
>
>REPLACE intforced WITH -2147483648 fired overflow error,
>then i aspected ODBC error
>--------------------------------------------------------------------
>intodbc | *********** | I | i aspected error
>
>see intforced
>
>--------------------------------------------------------------------
>bigint | -9223372036854775808 | N(20,0)
>
>Good ?
>No !
>? bigint=-9223372036854775808
>
>Open Browse window
>
> SET FIXED ON
>you see -9223372036854778000
>( VFP write chars -9223372036854775(8 over 5)(0 over 8)(8 over 0)padl with 0 )
>
> SET FIXED OFF
>go on bigint cell : you see -9223372036854778000 ( textbox writer program )
>go out bigint cell: you see -9223372036854775808 ( column write progarm )
>
>SET CARRY ON
>APPEND BLANK
>now appended bigint value is -9223372036854778000.
>
>Who more of it has more puts some!
>
>--------------------------------------------------------------------
>monOk | -922337203685477.5807| Y | OK
>
>--------------------------------------------------------------------
>intdefault | 0.0000| Y |
>
>REPLACE intdefault with -922337203685477.5808 fired overflow error,
>then i aspected ODBC error
>
>0 is very very bad
>
>********************************
>What means to support a external data type?
>Perhaps it means to return a value, also various, without having errors?
>
>Result:
>I must filled MSQL of one incredible amount of controls or redefine
>integer,bigint,money datatype.
>
>Fabio
--sb--