freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Thompson, Bill D (London)" <bill.d.thompson AT baml.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] BigInt in SQL Server
- Date: Mon, 02 Aug 2010 13:50:38 +0100
Hi,
This is *probably* to do with the version of the TDS protocol you have
specified (in the freetds.conf file)
The BIGINT datatype is only supported by tds version 8.0 and beyond.
If you have tds version 7.0 , then the SQL server will convert the
BIGINT data to FLOAT before pushing it down the wire to the client.
Bill
-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Libin Qi
Sent: 26 July 2010 19:07
To: freetds AT lists.ibiblio.org
Subject: [freetds] BigInt in SQL Server
Hi! All: I am using CT Library comes with freeTDS to get some data from
a
Microsoft SQL Server. I noticed if the field is defined as BigInt(which
is a 64
bit int) in SQL Server, the CT Library somehow translates it into a
CS_FLOAT_TYPE and ended up losing some precision. I wonder if this is a
known
bug?
e.g.
In SQL Server, do this:
create table test1(AA bigint, BB int, CC smallint, DD tinyint, EE
float)
;
insert into test1 values(1234567891234567899, 12345678,123,12,
13.245678) ;
When I retrieve that record using CT Library, it becomes:
1234567891234567936,12345678,123,12,13.245678
You can see the first coumn is different from database. but If I do the
select
command directly in SQL Server console, I got the original number, which
indicates the server does not lose the precision.
Thanks!
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
--------------------------------------------------------------------------
This message w/attachments (message) may be privileged, confidential or
proprietary, and if you are not an intended recipient, please notify the
sender, do not use or share it and delete it. The information contained in
this e-mail was obtained from sources believed to be reliable; however, the
accuracy or completeness of this information is not guaranteed. Unless
specifically indicated, this message is not an offer to sell or a
solicitation of any investment products or other financial product or
service, an official confirmation of any transaction, or an official
statement of Merrill Lynch. Subject to applicable law, Merrill Lynch may
monitor, review and retain e-communications (EC) traveling through its
networks/systems. The laws of the country of each sender/recipient may impact
the handling of EC, and EC may be archived, supervised and produced in
countries other than the country in which you are located. This message
cannot be guaranteed to be secure or error-free. References to "Merrill
Lynch" are references to any company in the Merrill Lynch & Co., Inc. group
of companies, which are wholly-owned by Bank of America Corporation.
Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank
Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to
Any Banking Service or Activity * Are Not Insured by Any Federal Government
Agency. Past performance is no guarantee of future results. Attachments that
are part of this E-communication may have additional important disclosures
and disclaimers, which you should read. This message is subject to terms
available at the following link: http://www.ml.com/e-communications_terms/.
By messaging with Merrill Lynch you consent to the foregoing.
--------------------------------------------------------------------------
- Re: [freetds] BigInt in SQL Server, Thompson, Bill D (London), 08/02/2010
Archive powered by MHonArc 2.6.24.