ODBC and Excel

Steve Holden sholden at holdenweb.com
Thu Apr 18 15:01:18 EDT 2002


"Clive Bluston" <clive at emultek.co.il> wrote in message
news:3cbed86d at news.barak.net.il...
> I am new to Python. I am trying to read from an Excel file and cannot even
> get connected. The following code gives me:
> dbi.internal-error: [Microsoft][ODBC Driver Manager] Invalid string or
> buffer length in LOGIN
> Has anyone any idea what I may be doing wrong?
>
> import dbi, odbc;
>
>         s = odbc.odbc('ODBC;Driver={Microsoft Excel Driver
> (*.xls)};DBQ=d:\\clive\\python\\DEFAULT.XLS;DriverID=790')
>  Timeout=5;')
>
Have you tried establishing a System DSN and just using that as the argument
to odbc.odbc?

regards
 Steve







More information about the Python-list mailing list