src/sql/kernel/qsqlresult.cpp
changeset 19 fcece45ef507
parent 18 2f34d5167611
equal deleted inserted replaced
18:2f34d5167611 19:fcece45ef507
   561 
   561 
   562     Setting forward only to false is a suggestion to the database engine,
   562     Setting forward only to false is a suggestion to the database engine,
   563     which has the final say on whether a result set is forward only or
   563     which has the final say on whether a result set is forward only or
   564     scrollable. isForwardOnly() will always return the correct status of
   564     scrollable. isForwardOnly() will always return the correct status of
   565     the result set.
   565     the result set.
       
   566 
       
   567     \note Calling setForwardOnly after execution of the query will result
       
   568     in unexpected results at best, and crashes at worst.
   566 
   569 
   567     \sa isForwardOnly(), fetchNext(), QSqlQuery::setForwardOnly()
   570     \sa isForwardOnly(), fetchNext(), QSqlQuery::setForwardOnly()
   568 */
   571 */
   569 void QSqlResult::setForwardOnly(bool forward)
   572 void QSqlResult::setForwardOnly(bool forward)
   570 {
   573 {
   705     \overload
   708     \overload
   706 
   709 
   707     Binds the value \a val of parameter type \a paramType to the \a
   710     Binds the value \a val of parameter type \a paramType to the \a
   708     placeholder name in the current record (row).
   711     placeholder name in the current record (row).
   709 
   712 
   710     Note that binding an undefined placeholder will result in undefined behavior.
   713    Values cannot be bound to multiple locations in the query, eg:
       
   714    \code
       
   715    INSERT INTO testtable (id, name, samename) VALUES (:id, :name, :name)
       
   716    \endcode
       
   717    Binding to name will bind to the first :name, but not the second.
       
   718 
       
   719     \note Binding an undefined placeholder will result in undefined behavior.
       
   720 
       
   721     \sa QSqlQuery::bindValue()
   711 */
   722 */
   712 void QSqlResult::bindValue(const QString& placeholder, const QVariant& val,
   723 void QSqlResult::bindValue(const QString& placeholder, const QVariant& val,
   713                            QSql::ParamType paramType)
   724                            QSql::ParamType paramType)
   714 {
   725 {
   715     d->binds = NamedBinding;
   726     d->binds = NamedBinding;