<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br></div><div>I installed the Windows binary package PyQt-Py2.6-gpl-4.7.2-1.exe on WindowsXP SP3 which is running PostgreSQL 8.3</div><div><br></div><div>The download page says "Qt (<span class="Apple-style-span" style="font-family: arial, sans-serif; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">with database support for MySQL, PostgreSQL, SQLite3 and ODBC)" which leads me to believe it will be able to connect to my local PostgreSQL database out of the box. </span></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;">I wrote a simple test script which works on my OS X machine:</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><div>from PyQt4.QtCore import *</div><div>from PyQt4.QtSql import *</div><div><br></div><div>db = QSqlDatabase.addDatabase("QPSQL");</div><div>db.setHostName("localhost");</div><div>db.setDatabaseName("e2pos");</div><div>db.setUserName("e2pos");</div><div>db.setPassword("emporos");</div><div>db.setPort(5432);</div><div>db.open()</div><div>exit()</div><div><br></div><div>When I run this on OS X it connects to the database(and I have done selects and inserts from my OS X install). In windows I get the following error:</div></span></font></div><meta charset="utf-8" id="webkit-interchange-charset"><div><br></div><div>Z:\e2pos\e2pos>python database.py</div><div>QSqlDatabase: QPSQL driver not loaded</div><div>QSqlDatabase: available drivers:</div><div>QSqlDatabase: an instance of QCoreApplication is required for loading driver plugins </div><div><br></div><div>So I am looking for confirmation that the Windows binaries that are supplied on the PyQt download page come ready for connections to the different DB's listed. If it is supposed to work out the box, does anyone know what I could be doing that would cause this. </div><div><br></div><div>If I need to compile a plsql driver does anyone know instructions I can follow?</div><div><br></div><div>Thanks,</div><div><br><div>
<div>Brandon Orther</div><div>Developer | Emporos Systems Corporation</div><div><a href="mailto:borther@emporos.net">borther@emporos.net</a></div><div><a href="http://www.emporos.net">www.emporos.net</a></div></div></div></body></html>