How to access ODBC databases ?
Timothy Madden
terminatorul at gmail.com
Fri Sep 4 15:30:20 EDT 2009
Martin P. Hellwig wrote:
> Timothy Madden wrote:
> <cut>
>> >>> conn = pyodbc.connect('DRIVER={PostgreSQL
>> Unicode};Servername=127.0.0.1;UID=pikantBlue;Database=pikantBlue')
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in <module>
>
>> pyodbc.Error: ('0', '[0] [nxDC (202) (SQLDriverConnectW)')
>
> Not sure (i.e. wild guess) but that line makes me think it has something
> to do with the encoding, is it possible to try a different driver?
>
Thank you.
Slackware also comes with mysql, I guess I could try to install and
register a driver for it in my unixODBC installation.
What about the encoding ? What should I be looking for in this case ?
Indeed when I try
createdb --encoding=UTF-8 pikantBlue
I get the message that the server's /LC_TYPE settings require encoding
to be LATIN1/. What should I do about it ? Should I have been more
careful about the configure options when compiling postgresql ? I also
tried pyodbc on Ubuntu with the database installed with apt-get and I
still get the same problem.
Thank you
Timothy Madden
More information about the Python-list
mailing list