On Thu, Apr 17, 2008 at 10:02 AM, Lukasz Szybalski <[EMAIL PROTECTED]> wrote:
> On Mon, Apr 7, 2008 at 4:37 PM, Rick Morrison <[EMAIL PROTECTED]> wrote:
>  >
>  > > The limitation here I guess is 30 char identifier limit but I will
>  >  > need to test it.
>  >
>  > Ah yeah, you're going to have bigger problems than 30 char identifiers with
>  > the Sybase TDS settings. MSSQL uses a different set of wire-protocol
>  > representations of datetime types, and your dates are going to be off.
>  >
>  >
>  > > In order to use more characters the FreeTDS should be configured to
>  > > use TDS protocol 7.0 which:
>  >
>  >
>  > Even that one is old: MSSQL switched to TDSv7 back in MSSQL 7.0 (circa 
> 1997)
>  >  They're now on TDSv8 as of MSSQL-2000
>  >
>  > Here's a chart:
>  >
>  > http://www.freetds.org/tds.html
>  >
>  > It beats me why FreeTDS still defaults to Sybase instead of MSSQL, the
>  > installed base has to run at least 100 to 1 in favor of MSSQL. Oh well.
>  >
>  > When you get all this set up correctly, you may want to update the
>  > sqlalchemy wiki with all this stuff.
>  >
>
>  What I have found out is that in dsn less connection is not going
>  through the freetds.conf.
>  So me settings things there has no point.
>
>  So the way we passed DRIVER={TDS} I would also have to pass TDS_Version
>
>
>  cnxn = 
> pyodbc.connect("SERVER=xxx;UID=xxx;PWD=xxx;DRIVER={TDS};TDS_Version=7.0")
>
>  this actually returns results that are longer then 30.
>  Lucas
>


On Thu, Apr 17, 2008 at 11:09 AM, Rick Morrison <[EMAIL PROTECTED]> wrote:

> Two points:
>
> - Unless you're running Sybase, it's possible to set the default TDS version
> in the TDS config file, which would eliminate the need for this.
>
> - The end point of all of these parms is to simply build an ODBC connection
> string. Wouldn't a parm that just allowed the specification of the string
> as-is be just as useful but a lot more flexible/simpler?
>

Here are the options as specified by free TDS. What you are talking
about is setting it in conf file which is used only for dsn
connection.
pyodbc takes this TDS_Version parameter with no problems.

here is what freetds said:
to use TDS 7.0 in a DSN-less connection, your options are:

1.  Rebuild FreeTDS --with-tdsver=7.0, or
2.  Set the environment variable TDSVER=7.0 before starting Python, or
3.  Add "TDS_Version=7.0;" to your connection string.
4.  Use "Servername" in your connection string.

options 3 seems the easies to me.
Let me know
Lucas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to