Closed GoogleCodeExporter closed 9 years ago
Generally the error means that the the driver name "PostgreSQL Unicode" is not
an exact match for an installed driver. Check the list of drivers install in
the registry under HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers
and make sure it is exactly the same.
Original comment by mkleehammer
on 12 Jun 2011 at 5:17
This has been a while, but thought I would chime in. You do not need an ODBC
setup on the local machine to connect with PSYCOPG2.
PSYCOPG2 Example connecting to PostgreSQL:
[code]
import psycopg2
pconn_string = "host='gothim' dbname='batlayer' user='batman'
password='vickyvale'"
try:
pconn = psycopg2.connect(pconn_string)
except:
sys.exit("Unable to connect to PostgreSQL database")
cursor = pconn.cursor()
[/code]
I don't setup anything in ODBC and don't even have the native drivers or
postgresql drivers installed. Works fine, takes two seconds to install
psycopg2.
Original comment by eatmeima...@gmail.com
on 27 Sep 2012 at 1:45
Closing due to inactivity and inability to reproduce.
Original comment by mkleehammer
on 29 Sep 2012 at 7:55
\COPY command of postgresql is giving error "pyodbc.Error: ('HY000', 'HY000?
ERROR: syntax error at or near "\\" at character 7;\nError while executing the
query (7) (SQLExecDirectW)')"
Even though I have escape '\' with '\\'
please Help Thanks in advance
Original comment by dream...@gmail.com
on 9 May 2013 at 4:14
Original issue reported on code.google.com by
jan.p...@gmail.com
on 29 May 2011 at 6:18