QSqlQuery query;
query.exec(QString("select count(*) from sqlite_master where type='table' and name='%1'").arg(TableName));
if(query.next())
{
if(query.value(0).toInt()==0)
{
// 表不存在
}else
{
//表存在
}
}
QSqlQuery query;
query.exec(QString("select count(*) from sqlite_master where type='table' and name='%1'").arg(TableName));
if(query.next())
{
if(query.value(0).toInt()==0)
{
// 表不存在
}else
{
//表存在
}
}