hi all,
  I have installed python 2.5 , QT 4.3.3 opensource with mingw, and pyqt 
4.3.1-1 on a winXP machine.
  I am trying to establish a connection to the postgres SQL 8.2 database on my 
machine using the pyqt . The code is as under :-
   
  from PyQt4.QtGui import *
from PyQt4.QtCore import *
from PyQt4 import QtSql
   
  db = QtSql.QSqlDatabase.addDatabase("QPSQL")
db.setDatabaseName("test")
db.setUserName("root")
db.setPassword("mypass")
name = db.open()
print db.lastError().text()

  I get an error driver not loaded . I can't understand how to have the psql 
driver loaded.
  Can someone help me out.
  By the using psycopg2 I can easily establish connection and also execute 
queries on the database.
  thanks in advance.
  nishith

       
---------------------------------
Never miss a thing.   Make Yahoo your homepage.
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to