Urgent: User authentication problems using ODBC thru Mod_python/Apache

Thomas Weholt thomas at cintra.no
Thu May 31 13:29:50 EDT 2001


"Thomas Weholt" <thomas at cintra.no> wrote in message
news:wGuR6.3616$lM3.84878 at news1.oke.nextra.no...
> I've defined a System DSN/ODBC-resource using the ODBC Data Source
> Administrator, gat_reg.
> When using the PythonWin ODBC-module thru PythonWin it works great. I've
> also installed Apache and mod_python
> and when the same objects using the odbc-code is called in pages served by
> Apache I get a error like :
> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
> 'domainname\username$'. in LOGIN
> ( Where domainname and username is replaced with actual data ).
>
> Why? What's so different when I'm using ODBC in Apache than in plain
python?
> How can I fix this?
>
> Thomas
>
>
>

Hours of despair paid off - for anybody interested;

Python programming on Win32 tells you that a ODBC-connection string is
something like "DSN=mydatabase;UID=username;PWD=password". It probably is
everywhere else but PythonWins odbc-module uses connection strings like this
"mydatabase/username/password". Thanks to a little page somewhere on
Python.org I'm now getting somewhere.

Nice to know.

Remember to set the correct settings in the ODBC-manager too ( "With
SQL-server authentication using login ID and password entered by the user",
un-click the "Connect to SQL-server to obtain"-checkbox at the bottom. )

Thomas









More information about the Python-list mailing list