On Thu, Apr 3, 2008 at 1:36 PM, Lukasz Szybalski <[EMAIL PROTECTED]> wrote:
> On Wed, Apr 2, 2008 at 4:24 PM, Michael Bayer <[EMAIL PROTECTED]> wrote:
> > Gottit. Notice, pyodbc is truncating all the column names to 30
> characters.
> > anyway, thats why its broken. Is this a bug in pyodbc ? I thought MS-SQL
> > has a much bigger limit than this ?
>
> I don't know if I mentioned it but using max identifier length allows
> me to get my data... from svn code (4430)
> Thanks.
>
> sqlalchemy.create_engine('mssql://xxx:[EMAIL
> PROTECTED]:1433/xxxxx?driver=TDS&max_identifier_length=30')
>
> I will play around with pyodbc and see where if the limit is coming from
> there.
>
FYI.
http://www.freetds.org/userguide/choosingtdsprotocol.htm
On unix freeTDS is supporting various TDS protocols.
Current default is 4.2
Sybase before System 10, Microsoft SQL Server 6.x;
4.2
Still works with all products, subject to its limitations.
The limitation here I guess is 30 char identifier limit but I will
need to test it.
In order to use more characters the FreeTDS should be configured to
use TDS protocol 7.0 which:
Includes support for the extended datatypes in SQL Server 7.0 (such as
char/varchar fields of more than 255 characters), and support for
Unicode.
In freetds.conf the following section should be changed from:
[global]
# TDS protocol version
tds version = 4.2
to
tds version = 7.0
Version 4.2 has limitation such as:
TDS 4.2 has limitations
ASCII only, of course.
RPC is not supported.
BCP is not supported.
varchar fields are limited to 255 characters. If your table
defines longer fields, they'll be truncated.
dynamic queries (also called prepared statements) are not supported.
I'll try to test it tomorrow and see if I don't have to use max identifier.
Lucas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---