Skip to Content.
Sympa Menu

freetds - Re: [freetds] unixodbc and character identifier limits?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lukasz Szybalski" <szybalski AT gmail.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] unixodbc and character identifier limits?
  • Date: Fri, 11 Apr 2008 11:05:02 -0500

On Mon, Apr 7, 2008 at 2:57 PM, James K. Lowden <jklowden AT freetds.org> wrote:
> Lukasz Szybalski wrote:
> > On Thu, Apr 3, 2008 at 11:00 AM, James K. Lowden <jklowden AT freetds.org>
> > wrote:
> > >
> > > Lukasz Szybalski wrote:
> > > > On Thu, Apr 3, 2008 at 10:33 AM, James K. Lowden
> > > > <jklowden AT freetds.org> wrote:
> > > > > Lukasz Szybalski wrote:
> > > > > > I came across a 30 character
> > > > > > identifier limit. In results I wasn't able to query my
> > > > > > records unless
> > > > > > I have changed the identifier name to something under 30 char.
> > > > >
> > > > > It sounds like you're using TDS 4.2 or a Sybase server.
> > > >
> > > > lucas@debianlaptop:~$ apt-cache policy tdsodbc
> > > > tdsodbc:
> > > > Installed: 0.63-3.2
> > > >
> > > > and I am using sqlserver 2000.
> > >
> > > Yes. I wasn't referring to the FreeTDS release. I was referring to
> > > the version of the TDS protocol you're using. It's controlled by the
> > > configure script, the "tds version" setting in freetds.conf and the
> > > TDSVER environment variable (later overriding earlier). See the UG
> > > for details.
> >
>
> > What version should I change it to? Right now it has:
> >
> > [global]
> > # TDS protocol version
> > tds version = 4.2
>
> http://www.freetds.org/userguide/choosingtdsprotocol.htm
>
> "Version 7.0 is recommended for compatibility with SQL Server tools."
>
> Change
>
> tds version = 4.2
>
> to
>
> tds version = 7.0
>

ok I switched to 7.0 but while using pyodbc / ceodbc I get the following:

>>> connection = ceODBC.Connection("DRIVER={TDS};Server=xxx;UID=xxx;PWD=xxx")
>>> c=connection.cursor()
>>> c.execute('select xxxxxxx.HISTORY_NUMBER as
xxxxxx_xxxxxx_HISTORY_NUMBER_38_THIS_IS_OVER_30 from
xxxxxx').fetchone()

(' 7547',)
>>> print c.description
[('xxxxxx_xxxxx_HISTORY_NUMBER_38_TH', <type 'ceODBC.StringVar'>, 8,
8, 0, 0, False

As you can see the description is cut off?
When I specify the DRIVER={TDS} is that going through
/etc/freetds/freetds.conf ?

This is how I have installed:
vi /etc/freetds/tds.driver.template

[TDS]
Description = FreeTDS Driver for Linux & MSSQL on Win32
Driver = /usr/lib/odbc/libtdsodbc.so
Setup = /usr/lib/odbc/libtdsS.so


odbcinst -i -d -f /etc/freetds/tds.driver.template

Is this correct, or I have to configure something else?

How could I replicate this in isql?
Lucas




Archive powered by MHonArc 2.6.24.

Top of Page