Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS problems with converting SQL BigInt

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Feroze Daud <khichdo AT yahoo.com>
  • To: Igor Korot <ikorot01 AT gmail.com>, FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FreeTDS problems with converting SQL BigInt
  • Date: Thu, 19 Sep 2013 12:22:06 -0700 (PDT)

Here it is...

SELECT @@VERSION
Microsoft SQL Server 2008 (SP3) - 10.0.5500.0 (X64)   Sep 21 2011 22:45:45  
Copyright (c) 1988-2008 Microsoft Corporation  Developer Edition (64-bit) on
Windows NT 6.2 <X64> (Build 9200: )




________________________________
From: Igor Korot <ikorot01 AT gmail.com>
To: Feroze Daud <khichdo AT yahoo.com>; FreeTDS Development Group
<freetds AT lists.ibiblio.org>
Sent: Thursday, September 19, 2013 12:13 PM
Subject: Re: [freetds] FreeTDS problems with converting SQL BigInt



Hi, Feroze,
What is you Server version?

Thank you.




On Thu, Sep 19, 2013 at 11:29 AM, Feroze Daud <khichdo AT yahoo.com> wrote:

we are using TDS protocol version 8. Should we be using something else?
>
>
>here is our connection string...
>
>--
>
>Initializing processing with connection
>string:DRIVER=FreeTDS;Server=<snip>;UID=<snip>;PWD=<snip>;Database=<snip>;TDS_Version=8.0;Port=1433
>
>--
>
>feroze.
>
>
>
>________________________________
> From: Frediano Ziglio <freddy77 AT gmail.com>
>To: Feroze Daud <khichdo AT yahoo.com>; FreeTDS Development Group
><freetds AT lists.ibiblio.org>
>Sent: Thursday, September 19, 2013 11:09 AM
>
>Subject: Re: [freetds] FreeTDS problems with converting SQL BigInt
>
>
>2013/9/19 Feroze Daud <khichdo AT yahoo.com>:
>> So, I enabled logging for my application. This is what it shows me for the
>> column that is being corrupted.
>>
>> --
>> token.c:526:processing result tokens.  marker is  81(TDS7_RESULT)
>> mem.c:519:tds_free_all_results()
>> token.c:1472:processing TDS7 result. set current_results to tds->res_info
>> read.c:179:tds_get_string: reading 20 from wire to give 10 to client.
>> token.c:1414:tds7_get_data_info:
>>         colname = MaxQueueID (10 bytes)
>>         type = 108 (numeric)
>>         server's type = 108 (numeric)
>>         column_varint_size = 1
>>         column_size = 17 (17 on server)
>>
>> --
>>
>> Does this mean that the TDS stream that is being read by freetds is
>> advertizing the column as numeric?
>>
>
>No, it means the server is returning the number as numeric. Are you
>sure you are using proper protocol version?
>
>> Is there any way to have tdslog print out the value of the column that it
>> is reading from the socket?
>>
>
>If you can read binary yes, just turn network data dump on.
>
>> feroze.
>>
>>
>>
>
>Frediano
>
>>
>> ----- Original Message -----
>> From: James K. Lowden <jklowden AT freetds.org>
>> To: freetds AT lists.ibiblio.org
>> Cc: Feroze Daud <khichdo AT yahoo.com>; FreeTDS Development Group
>> <freetds AT lists.ibiblio.org>
>> Sent: Wednesday, September 18, 2013 6:32 PM
>> Subject: Re: [freetds] FreeTDS problems with converting SQL BigInt
>>
>> On Wed, 18 Sep 2013 13:03:50 -0700 (PDT)
>> Feroze Daud <khichdo AT yahoo.com> wrote:
>>
>>> Thanks. Unfortunately, I need to get the output parameter first, so I
>>> changed the sproc to return the value as a resultset, instead of an
>>> output parameter.
>>
>> As Frediano mentioned, the server sends the output parameter after any
>> ROW packets.  FreeTDS makes the data available to the application as
>> they arrive from the server.
>>
>>> This brings me to the original problem. I am getting garbage values
>>> out of call to getBigInteger.
>>
>> What does src/odbc/unittests/genparams show on your machine regarding
>> the BIGINT type?
>>
>>> Is there any way to enable Freetds logging for applications that dont
>>> go through the odbc driver manager?
>>
>> Cf. TDSDUMP in the user guide.
>>
>> HTH.
>>
>> --jkl
>>
>> P.S.  Top-posting reduces the value of the email archive by making it
>> harder to follow the thread.
>> _______________________________________________
>> FreeTDS mailing list
>> FreeTDS AT lists.ibiblio.org
>> http://lists.ibiblio.org/mailman/listinfo/freetds
>_______________________________________________
>FreeTDS mailing list
>FreeTDS AT lists.ibiblio.org
>http://lists.ibiblio.org/mailman/listinfo/freetds
>
>From msabramo AT gmail.com Thu Sep 19 16:19:11 2013
Return-Path: <msabramo AT gmail.com>
X-Original-To: freetds AT lists.ibiblio.org
Delivered-To: freetds AT lists.ibiblio.org
Received: by lists.ibiblio.org (Postfix, from userid 20217)
id BD70AE963A; Thu, 19 Sep 2013 16:19:11 -0400 (EDT)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
mailman1.ibiblio.org
X-Spam-Level:
X-Spam-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham
version=3.3.1
Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com
[74.125.82.45])
by lists.ibiblio.org (Postfix) with ESMTP id 48B46E962A
for <freetds AT lists.ibiblio.org>; Thu, 19 Sep 2013 16:19:06 -0400 (EDT)
Received: by mail-wg0-f45.google.com with SMTP id y10so8580284wgg.12
for <freetds AT lists.ibiblio.org>; Thu, 19 Sep 2013 13:19:05 -0700 (PDT)
MIME-Version: 1.0
X-Received: by 10.194.241.228 with SMTP id wl4mr3035892wjc.2.1379621945464;
Thu, 19 Sep 2013 13:19:05 -0700 (PDT)
Received: by 10.194.14.231 with HTTP; Thu, 19 Sep 2013 13:19:05 -0700 (PDT)
Date: Thu, 19 Sep 2013 13:19:05 -0700
Message-ID:
<CAAgNOZ0VhC0OTiZ0=-nFS+TQSXPjXvH4osXTF42ycDOMDA1Lvg AT mail.gmail.com>
From: Marc Abramowitz <msabramo AT gmail.com>
To: FreeTDS mailing list <freetds AT lists.ibiblio.org>
Content-Type: text/plain; charset=ISO-8859-1
X-Content-Filtered-By: Mailman/MimeDel 2.1.9
Subject: [freetds] In what version of FreeTDS did tdsdbopen get the msdblib
flag?
X-BeenThere: freetds AT lists.ibiblio.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
List-Id: FreeTDS Development Group <freetds.lists.ibiblio.org>
List-Unsubscribe: <http://lists.ibiblio.org/mailman/listinfo/freetds>,
<mailto:freetds-request AT lists.ibiblio.org?subject=unsubscribe>
List-Archive: <https://lists.ibiblio.org/sympa/arc/freetds>
List-Post: <mailto:freetds AT lists.ibiblio.org>
List-Help: <mailto:sympa AT lists.ibiblio.org?subject=HELP>
List-Subscribe: <http://lists.ibiblio.org/mailman/listinfo/freetds>,
<mailto:freetds-request AT lists.ibiblio.org?subject=subscribe>
X-List-Received-Date: Thu, 19 Sep 2013 20:19:11 -0000

Didn't realize until now that you don't have to use a FreeTDS compiled with
--enable-msdblib as you can just compile with #define MSDBLIB and dbopen
will call tdsdbopen with msdblib = 1 so that dates are handled correctly...
Very cool!

It looks like it goes back to before FreeTDS 0.82 but couldn't find it in
the ChangeLog.




Archive powered by MHonArc 2.6.24.

Top of Page