Fail to connect to Oracle database sometimes
-
I'm having an issue connecting to the Oracle database. Some schemas can connect programmatically using QSqlDatabase::open() while other schemas fail to connect programmatically. The schemas that fail to connect programmatically using QSqlDatabase::open() can make the connection via sqlplus and sqldeveloper without any problem.
I have tried using QSqlError:databaseText() and QSqldatabase::driverText and both methods fail to elaborate on what the connection issue is.
Any ideas?
-
Hi and welcome to devnet,
Can you explain the difference between the working and non-working databases ?
Also, which version of Qt are you using ? On what OS ?
-
@SGaist
I am using Qt 4.7
I am confused by your use of the word database in the Oracle world. In Oracle each user/logon is represented as a schema. These schemas which I am using are imported into my local oracle database from an external oracle database using the Oracle impdp tool. As I mentioned some of the newly imported schemas work just fine with QT connecting to the database. Other imports work with the Orlacle interfaces sqlplus and sqldeveloper allowing me to connect to the database but fail to make the connection with the QSqlDatabase:::open() method. -
Qt 4.7 is pretty outdated, you should switch to Qt 5 or if you can't you should at least go with 4.8.7 which is the latest and last release of the Qt 4 series.
Can you describe precisely what the difference is between your working and not working use case ?
How are you trying to establish the connections ?