Hi everybody,
QT: 4.1.3
OS: WIN XP
I tried to connect to my sql server via odbc and it works perfect. I have installed postgre 8.1 on my machine and build the plugin for postgre. I get a new file "qsqlpsql.dll". So i would like to connect it to a Postgre database. I get the known error: Driver not loaded, driver not loaded.
Here my code:
db.setHostName("localhost");
db.setDatabaseName("inventar");
db.setUserName("postgres");
db.setPassword("tekoteko");
if(!db.open())
{
QMessageBox::information(this,
"",db.
lastError().
text());
return false;
}
else
{
. . .
QSqlDatabase db = QSqlDatabase::addDatabase("QPSQL");
db.setHostName("localhost");
db.setDatabaseName("inventar");
db.setUserName("postgres");
db.setPassword("tekoteko");
if(!db.open())
{
QMessageBox::information(this,"",db.lastError().text());
return false;
}
else
{
. . .
To copy to clipboard, switch view to plain text mode
What could i try to make my connection running?
Thanks
Bookmarks