diff options
author | Bill King <bill.king@nokia.com> | 2010-03-03 00:01:47 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2010-03-03 00:01:47 (GMT) |
commit | 6c44ab0f6edebce1e7190b94ac5b74c81812f482 (patch) | |
tree | bc0208118196d5c542aa2cf521cc42268d3e9627 /src/sql/kernel/qsqlquery.cpp | |
parent | f392955d790dd736af83f936482f612ec9eb3813 (diff) | |
download | Qt-6c44ab0f6edebce1e7190b94ac5b74c81812f482.zip Qt-6c44ab0f6edebce1e7190b94ac5b74c81812f482.tar.gz Qt-6c44ab0f6edebce1e7190b94ac5b74c81812f482.tar.bz2 |
Updating SQL binding docs to reflect reality.
Task-number: QTBUG-7218
Reviewed-by: Justin McPherson
Diffstat (limited to 'src/sql/kernel/qsqlquery.cpp')
-rw-r--r-- | src/sql/kernel/qsqlquery.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sql/kernel/qsqlquery.cpp b/src/sql/kernel/qsqlquery.cpp index 6c6436f..430cf1a 100644 --- a/src/sql/kernel/qsqlquery.cpp +++ b/src/sql/kernel/qsqlquery.cpp @@ -999,10 +999,18 @@ bool QSqlQuery::execBatch(BatchExecutionMode mode) must be included when specifying the placeholder name. If \a paramType is QSql::Out or QSql::InOut, the placeholder will be overwritten with data from the database after the exec() call. + In this case, sufficient space must be pre-allocated to store + the result into. To bind a NULL value, use a null QVariant; for example, use \c {QVariant(QVariant::String)} if you are binding a string. + Values cannot be bound to multiple locations in the query, eg: + \code + INSERT INTO testtable (id, name, samename) VALUES (:id, :name, :name) + \endcode + Binding to name will bind to the first :name, but not the second. + \sa addBindValue(), prepare(), exec(), boundValue() boundValues() */ void QSqlQuery::bindValue(const QString& placeholder, const QVariant& val, |