Hi,
I installed QT 3.3.6
Tried to establish a connection with SQULITE database. But error messages says like
"file is encrypted or is not database error to open the database".
Below is my code.
if(!m_db->open())
{
m_db->setHostName( "localhost" );
m_db->setDatabaseName("ResumeDataBase");
m_db->setUserName( "root" );
m_db->setPassword("");
}
if ( ! m_db->open( ) )
{
QString l_sqlErrorString
= l_sqlError.
text();
QMessageBox::information(this,
"RTS", l_sqlErrorString
);
}
QSqlDatabase *m_db = QSqlDatabase::addDatabase("QSQLITE");
if(!m_db->open())
{
m_db->setHostName( "localhost" );
m_db->setDatabaseName("ResumeDataBase");
m_db->setUserName( "root" );
m_db->setPassword("");
}
if ( ! m_db->open( ) )
{
QSqlError l_sqlError = m_db->lastError();
QString l_sqlErrorString = l_sqlError.text();
QMessageBox::information(this, "RTS", l_sqlErrorString);
}
To copy to clipboard, switch view to plain text mode
How to rectify this problem?
Bookmarks