Ben Chuanlong Du's Blog

It is never too late to learn.

Connect to Databases Using pyodbc in Python

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

pyodbc only supports qmark

https://github.com/mkleehammer/pyodbc/wiki

Unicode Converter Buffer Overflow

This issues arises in Python3 but not Python2, so the simplest way is to use Python2 if you do not have use Python3. And make sure do not use unicode queries.

  1. If you are using pyodbc in Python3 to query Vertica, then set the VERTICAINI environment variable and set DriverManagerEncoding=UTF-16 in vertica.ini. For more information, please refer to the issue Not working with Python 3.4.3 on OS X (Vertica driver) #44 on GitHub.

Comments