[egenix-users] MS SQL ODBC connect problem ("Option not
supported")
M.-A. Lemburg
mal at egenix.com
Tue Aug 17 10:43:36 CEST 2004
Robby Dermody wrote:
> Hi guys,
>
> This problem has been causing me to pull my hair out for the last day or
> two. I'm trying to use mxODBC under Debian Linux 'unstable' to connect
> to a MS SQL database via either unixODBC or iODBC.
>
> Relevant versions:
> mxODBC: 2.0.6
> mx-base: 2.0.5
> unixodbc: 2.2.4-9
> iodbc: 3.51.2
> freetds: 0.61
>
> With both unixODBC and iODBC, I have installed them, configured
> odbc.ini, and can use their test programs to connect to this database
> and query it fine. No problems there. However, when I mix mxODBC into
> the picture and try to connect via that, I get something like the
> following:
>
>
>>>>db =
>
> mx.ODBC.unixODBC.DriverConnect("DSN=testdsn;UID=testuser;PWD=pass;")
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> mxODBC.NotSupportedError: ('S1C00', 1, '[unixODBC]Option not supported',
> 5921)
>
>
> Here's the mxodbc.log output (when compiled in 'debug' mode):
>
> mxODBC_New_UseDriverConnect: dsn='DSN=testdsn;UID=testuser;PWD=pass;',
> clearAC=1
> mxODBC_ReportError: sqlstate='S1C00' code=1 text='[unixODBC]Option not
> supported' lineno=5921 rc=-1 mxODBC_New_UseDriverConnect: failed.
> mxODBC_New_UseDriverConnect: dsn='DSN=testdsn;UID=testuser;PWD=pass;',
> clearAC=0
> mxODBC_ReportError: sqlstate='S1C00' code=1 text='[unixODBC]Option not
> supported' lineno=5921 rc=-1
> mxODBC_New_UseDriverConnect: failed.
>
>
> I get the same output from iodbc, "Option not supported". Any idea how
> to find out WHAT option they're talking about? Note I get the same error
> when using Connect(), and as you can see, I've tried it with
> both clear_auto_commit=1 and clear_auto_commit=0 ...same thing each
> time.
>
> I'm thinking this is a problem between mxODBC and unixodbc/iodbc....and
> that it has nothing to do with freeTDS or the MS SQL server itself.
mxODBC does work with FreeTDS, so the problem must be with your setup.
Two things:
1. try to remove the final ";" in your DSN
2. check your odbc.ini file whether you are using unsupported
connection options.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Aug 17 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
More information about the egenix-users
mailing list