suresh
1st July 2008, 07:55
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.
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);
}
How to rectify this problem?
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.
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);
}
How to rectify this problem?