首页| 论坛| 消息

回复: 请教一个数据库提交的问
#6 [hehui 11-30 09:56]
试试insertRowIntoTable看看能不能成功

bool QSqlTableModel::insertRowIntoTable(const QSqlRecord &values)
Inserts the values values into the currently active database table.
This is a low-level method that operates directly on the database and should not be called directly. Use insertRow() and setData() to insert values. The model will decide depending on its edit strategy when to modify the database.
Returns true if the values could be inserted, otherwise false. Error information can be retrieved with lastError().

<< 1 2 >> (2/2)

回复 发表
主题 版块