I'm trying to connect to a postgreSQL database without configuring System DSN with ODBC, I've googled a lot and I've tried a lot of connection strings but they didn't work, maybe I'm doing something wrong. Here is one of the connection strings i've tried:
dbConnectionString = QString("Driver=PostgreSQLUnicode(x64)}|
Server="+DBhost+"|Port=%1|Database="+dbname+"|Uid="+username+"|Pwd="+password+"|ByteaAsLongVarBinary=1").arg(port)
db.setDatabaseName(dbConnectionString);
Any suggestion?