I use this to create a table whick is a variable "tableName", why the following codes doesn't woek:
build.
exec( QString("create table %1 (" "id INTEGER PRIMARY KEY AUTOINCREMENT,"
"name VARCHAR(90)"
"author VARCHAR(50)"
"copy INTEGER"
"press VARCHAR(120))").arg( name) )
QSqlQuery build;
build.exec( QString("create table %1 ("
"id INTEGER PRIMARY KEY AUTOINCREMENT,"
"name VARCHAR(90)"
"author VARCHAR(50)"
"copy INTEGER"
"press VARCHAR(120))").arg( name) )
To copy to clipboard, switch view to plain text mode
and before these codes, I have open the database.
Thanks in advance.
Bookmarks