I don't know, I jusr use the following codes:
bool ok
= build.
exec( QString("create table %1 (" "id INTEGER PRIMARY KEY AUTOINCREMENT,"
"name VARCHAR(90)"
"author VARCHAR(50)"
"copy INTEGER"
"press VARCHAR(120))").arg( name) )
if( !ok )
QMessageBox::information(this,
"Fail",
"Fail to create new table!!");
QSqlQuery build;
bool ok = build.exec( QString("create table %1 ("
"id INTEGER PRIMARY KEY AUTOINCREMENT,"
"name VARCHAR(90)"
"author VARCHAR(50)"
"copy INTEGER"
"press VARCHAR(120))").arg( name) )
if( !ok )
QMessageBox::information(this, "Fail", "Fail to create new table!!");
To copy to clipboard, switch view to plain text mode
But I am sure the table doesn't exit.
puzzled.
Bookmarks