I'm new here I want to run this code :
Active5 years, 1 month ago
Create a connection (i.e., an instance of QSqlDatabase) by calling one of the static addDatabase functions, where you specify the driver or type of driver to use (depending on the type of database) and a connection name. A connection is known by its own name, not by the name of the database it connects to. You can have multiple connections to. Iso 4217 wikipedia. If type is not available or could not be loaded, PySide.QtSql.QSqlDatabase.isValid returns false. For the QOCI (Oracle) driver, the database name is the TNS Service Name. For the QODBC driver, the name can either be a DSN, a DSN filename (in which case the file must have a.dsn extension), or a connection string. @@ -58,11 +62,13 @@ drivers of type QDB2 are available in this Qt. Yeah hello there, I'm really new here. So here's the problem. QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7 I've checked many forums already and have done things so far: 1) This is my.pro file QT += core QT += sql QT -= gui.
when I try to run it I become this fault
QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7
I have window7, 32 bit System , Msql 5.1.72, qt.5.1.1, visual Studio 2010
Any advice please ?
zessx
59.8k2525 gold badges107107 silver badges143143 bronze badges
The ManThe Man
13411 gold badge44 silver badges1717 bronze badges
2 Answers
The error message hints that you have missed the vahanchovahancho
QMYSQL Speed exe free download. plugin. You may take a look at Qt Documentation on how to build it on Windows.
16.9k33 gold badges2828 silver badges3636 bronze badges
Raja Simon
7,62833 gold badges2424 silver badges5757 bronze badges
garrygarry
Not the answer you're looking for? Browse other questions tagged c++mysqlqt or ask your own question.
Active2 months ago
I am using VS2008 & QT plugin to make my application. After making package when I am running the application I am getting error :
I have added the qsqlite.dll to my package & also changed the libpath. But still I am getting this error. How to solve this.
My Code::
qdot
![]()
4,32922 gold badges3636 silver badges9090 bronze badges
amrit_neoamrit_neo
1,28944 gold badges1616 silver badges3737 bronze badges
5 Answers
The drivers need to be placed under 'sqldrivers', not in the same directory as the executable (they are loaded on runtime, and Qt looks for them in 'sqldrivers'). A typical structure of one of our installed applications is like this:
qdotqdot
4,32922 gold badges3636 silver badges9090 bronze badges
Well, the function: addDatabase('QSQLITE'); takes two parameters, the first is the driver and the second is the name of your connection, (passed as a QString)
Now, try the following:
It worked for me, so I guess it'll work for you. (Assuming SQLITE is among your installed drivers)
You can check for SQLITE by the following:
Good luck!
Zaher J.G.
p-a-o-l-o
7,08422 gold badges1313 silver badges3333 bronze badges
ZaherZaher
Just Add dll file which have folder life platform and drivesr
so simply build app using windeployqt tool
DnyaneshwarDnyaneshwar
Anatoliy Nikolaev
19.3k1212 gold badges5555 silver badges6262 bronze badges
Qsqldatabase Qoci Driver Not Loaded Key
Harshi SrivastavaHarshi Srivastava
Qsqldatabase Qoci Driver Not Loaded Download
Linux platform:Build your Qt Source with the
BR2_PACKAGE_QT5BASE_SQLITE_QT=y option enabled in .config file, and copy sqldrivers generated in output path lib/qt/plugins/sqldrivers/libqsqlite.so to /usr/lib/qt/plugins/sqldrivers/ on Target board and run your application.Also you can Check where and all your binary/application looks for libraries and plugins using 'QApplication::libraryPaths()' API
Rukmananda ReddyRukmananda Reddy
Not the answer you're looking for? Browse other questions tagged c++visual-studiosqliteqt or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |