Hi All,
It has been asked many times and I tried several answers, but still no luck. I did the following :
1. Installed qt-linux-opensource-1.4.0-x86_64-online.run on Fedora 18
2. Selected everything and installed it in /opt/Qt
3. Tried compiling the following sources :
=========================
QSqlDatabase m_database = QSqlDatabase::addDatabase( “QMYSQL”, “DefaultDb” );
m_database.setDatabaseName( “face_scanner” );
m_database.setUserName( “<username>” );
m_database.setPassword( “<password>” );
m_database.setHostName( “<DB_Server>” );
if ( m_database.open() )
{
QString sqlQuery;
QSqlQuery oQuery;
// First we empty the entire table..
qDebug() << “Deleting data from tbl_images”;
sqlQuery = “DELETE * FROM tbl_images”;
if( !oQuery.exec( sqlQuery ) )
{
qDebug() << oQuery.lastError().text();
}
else
{
qDebug() << “Data deleted succesfully”;
}
=========================
4. At first the error states : QMYSQL driver not loaded
5. Followed instructions to compile and install the sql_pugins. No errors and installed as expected.
6. Tried to compile and run the code again…
7. The following errormessage is displayed… “Driver not loaded”
I’m stuck at the moment.. Anyone can help?
↧