# QSqlQuery Class Reference

### [com.trolltech.qt.sql package]

### Constructor

- void QSqlQuery(QSqlDatabase db)
- void QSqlQuery(QSqlResult r)
- void QSqlQuery(QSqlQuery other)
- void QSqlQuery(String query, QSqlDatabase db)

### Constructor Properties

- prototype: The QSqlQuery prototype object
- ValuesAsRows
- ValuesAsColumns
- BatchExecutionMode( value )

### Prototype Object Properties

- void addBindValue(Object val, ParamType type)
- int at()
- void bindValue(String placeholder, Object val, ParamType type)
- Object boundValue(String placeholder)
- SortedMap boundValues()
- void clear()
- QSqlDriver driver()
- bool exec()
- bool execBatch(BatchExecutionMode mode)
- String executedQuery()
- void finish()
- bool first()
- bool isActive()
- bool isForwardOnly()
- bool isNull(int field)
- bool isSelect()
- bool isValid()
- bool last()
- QSqlError lastError()
- Object lastInsertId()
- String lastQuery()
- bool next()
- bool nextResult()
- int numRowsAffected()
- NumericalPrecisionPolicy numericalPrecisionPolicy()
- bool prepare(String query)
- bool previous()
- QSqlRecord record()
- QSqlResult result()
- bool seek(int i, bool relative)
- void setForwardOnly(bool forward)
- void setNumericalPrecisionPolicy(NumericalPrecisionPolicy precisionPolicy)
- int size()
- Object value(int i)

### Instance Properties

QSqlQuery objects have no special properties beyond those inherited from the QSqlQuery prototype object.