No, it appears you're getting a different (and expected) error now.

"[ODBC Driver Manager] Data source name not found and no default driver
specified in LOGIN"

That means you didn't give a valid ODBC connection string when you tried to
create a connection.   Earlier you were getting "TypeError: exceptions must
be classes or instances, not str".  Try putting a valid connection string in
your test.

thanks,
Preston


On Wed, Dec 1, 2010 at 10:00 AM, Robin Becker <ro...@reportlab.com> wrote:

> On 01/12/2010 00:28, Vernon Cole wrote:
>
>> even more important, also install a new copy of pywin32.
>> http://sourceforge.net/projects/pywin32/
>>
>>
>>  .......
>
> OK I have installed both python 2.6.6 and the latest pywin32 ie build 214
> for 2.6 (before I had 212). I'm still getting that error.
>
> C:\code\rlextra\graphics\guiedit>cat toad.py
>
> try:
>    import odbc
>    print odbc.__file__
>    conn = odbc.odbc('not_a_db_path')
> except:
>    raise
>
> C:\code\rlextra\graphics\guiedit>toad.py
>
> C:\Python26\lib\site-packages\win32\odbc.pyd
> Traceback (most recent call last):
>  File "C:\code\rlextra\graphics\guiedit\toad.py", line 4, in <module>
>
>    conn = odbc.odbc('not_a_db_path')
> dbi.opError: [Microsoft][ODBC Driver Manager] Data source name not found
> and no default driver specified in LOGIN
>
> C:\code\rlextra\graphics\guiedit>ls -l
> C:\Python26\lib\site-packages\win32\odbc.pyd
> -rw-rw-rw-   1 user     group       28160 Jul  5  2009
> C:\Python26\lib\site-packages\win32\odbc.pyd
>
> C:\code\rlextra\graphics\guiedit>
>
> can you tell me what the timestamp of your odbc.pyd is to finally eliminate
> that as the source of the problem?
>
> --
>
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to