summaryrefslogtreecommitdiffstats
path: root/src/sql/kernel/qsqlresult.cpp
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2010-03-03 00:01:47 (GMT)
committerBill King <bill.king@nokia.com>2010-03-03 00:01:47 (GMT)
commit6c44ab0f6edebce1e7190b94ac5b74c81812f482 (patch)
treebc0208118196d5c542aa2cf521cc42268d3e9627 /src/sql/kernel/qsqlresult.cpp
parentf392955d790dd736af83f936482f612ec9eb3813 (diff)
downloadQt-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/qsqlresult.cpp')
-rw-r--r--src/sql/kernel/qsqlresult.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp
index 3d63f88..0c0c31c 100644
--- a/src/sql/kernel/qsqlresult.cpp
+++ b/src/sql/kernel/qsqlresult.cpp
@@ -707,7 +707,15 @@ void QSqlResult::bindValue(int index, const QVariant& val, QSql::ParamType param
Binds the value \a val of parameter type \a paramType to the \a
placeholder name in the current record (row).
- Note that binding an undefined placeholder will result in undefined behavior.
+ 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.
+
+ \note Binding an undefined placeholder will result in undefined behavior.
+
+ \sa QSqlQuery::bindValue()
*/
void QSqlResult::bindValue(const QString& placeholder, const QVariant& val,
QSql::ParamType paramType)