Obsolete Members for QSqlDatabase

以下成員源於類 QSqlDatabase 被棄用。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。

公共函數

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

成員函數文檔編製

[deprecated in 6.6] 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 ().