I need to connect to a postgree database 'testeDB' on my localhost
I tried the following code:
Qt Code:
if ( &DB ) { if ( DB.open() ) { qDebug()<< "OK!"; } else { qDebug()<< DB.lastError().text() << "\n"; } }To copy to clipboard, switch view to plain text mode
but I get an error when trying to open the connection, saying: (I`m translating it, so it may not be too accurate)
"Data Source name not found and QOBC3 default driver not specified: Not possible to connect."
Sooooo: how does I fix this?
Bookmarks