How to connect a Oracle Aunonomus Database
-
Hi,
Can someone help me with the connection to the Oracle Cloud from Qt.
I can't find any information on the Qt website, nor examples, but surely someone has wanted to connect to an instance of autonomous database, with Qt.
I already connect with SqlDeveloper, with SqlCl, I just need to be able to do it with Qt, because I can't find the way
Thank you very much !
-
Hi, thank you for your cooperation
Yes, it charges perfectly. My problem is how to write the connection.
My code is as follows,QCoreApplication a(argc, argv);
QSqlDatabase db = QSqlDatabase::addDatabase("QOCI");
db.setDatabaseName("db20220323123926_high");
db.setUserName("ADMIN");
db.setPassword(“12345678”);
db.setConnectOptions("OCI_ATTR_PREFETCH_ROWS=1000");if (!db.open())
{
Error("%s", db.lastError().text().toLatin1().data());
return 0;
}it loads the driver (I see it in the log) and it takes a while to connect. Then it indicates the following error:
ORA-28759: failure to open file. Unable to logon
The TNS LISTENER environment variable, points to the folder where the tnsnames.ora (connection) and sqlnet.ora (wallet location) files are.
the permissions of the wallet files are correct
I'm still looking for information...
-
I do my best work at 3AM....mark as solved?