Obsolete Members for QSqlDatabase

以下成员源于类 QSqlDatabase 被弃用。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

公共函数

(deprecated (6.6)) QSqlQuery exec (const QString & query = QString()) const

成员函数文档编制

QSqlQuery QSqlDatabase:: exec (const QString & query = QString()) const

This function is deprecated since 6.6. We strongly advise against using it in new code.

Executes a SQL statement on the database and returns a QSqlQuery 对象。使用 lastError () to retrieve error information. If query is empty, an empty, invalid query is returned and lastError () is not affected.

使用 QSqlQuery::exec () 代替。

另请参阅 QSqlQuery and lastError ().