# Poco::Data::ODBC

# class ODBCStatementImpl

Library: Data/ODBC
Package: ODBC
Header: Poco/Data/ODBC/ODBCStatementImpl.h

## Description

Implements statement functionality needed for ODBC

## Inheritance

Direct Base Classes: Poco::Data::StatementImpl

All Base Classes: Poco::Data::StatementImpl

## Member Summary

Member Functions: affectedRowCount, bindImpl, binder, canBind, canCompile, columnsReturned, compileImpl, execDirectImpl, extractor, hasNext, metaColumn, nativeSQL, next, printErrors

Inherited Functions: activateNextDataSet, activatePreviousDataSet, add, addBind, addExtract, affectedRowCount, bindImpl, binder, bindings, canBind, canCompile, columnsExtracted, columnsReturned, compileImpl, currentDataSet, dataSetCount, execDirectImpl, execute, executeDirect, extractionCount, extractionLimit, extractions, extractor, fixupBinding, fixupExtraction, getExtractionLimit, getState, getStorage, hasMoreDataSets, hasNext, isStoredProcedure, makeExtractors, metaColumn, next, removeBind, reset, resetBinding, rowsExtracted, session, setExtractionLimit, setStorage, subTotalRowCount, toString

## Constructors

### ODBCStatementImpl

ODBCStatementImpl(
SessionImpl & rSession
);

Creates the ODBCStatementImpl.

## Destructor

### ~ODBCStatementImpl

~ODBCStatementImpl() override;

Destroys the ODBCStatementImpl.

## Member Functions

### nativeSQL

std::string nativeSQL();

Returns the SQL string as modified by the driver.

### affectedRowCount

int affectedRowCount() const override;

Returns the number of affected rows. Used to find out the number of rows affected by insert or update.

See also: Poco::Data::StatementImpl::affectedRowCount()

### bindImpl

void bindImpl() override;

Binds all parameters and executes the statement.

See also: Poco::Data::StatementImpl::bindImpl()

### binder

AbstractBinding::BinderPtr binder() override;

Returns the concrete binder used by the statement.

See also: Poco::Data::StatementImpl::binder()

### canBind

bool canBind() const override;

Returns true if a valid statement is set and we can bind.

See also: Poco::Data::StatementImpl::canBind()

### canCompile

bool canCompile() const override;

Returns true if another compile is possible.

See also: Poco::Data::StatementImpl::canCompile()

### columnsReturned

std::size_t columnsReturned() const override;

Returns number of columns returned by query.

See also: Poco::Data::StatementImpl::columnsReturned()

### compileImpl

void compileImpl() override;

Compiles the statement, doesn't bind yet. Does nothing if the statement has already been compiled.

See also: Poco::Data::StatementImpl::compileImpl()

### execDirectImpl

void execDirectImpl(
const std::string & query
) override;

Execute query directly impl

See also: Poco::Data::StatementImpl::execDirectImpl()

### extractor

AbstractExtraction::ExtractorPtr extractor() override;

Returns the concrete extractor used by the statement.

See also: Poco::Data::StatementImpl::extractor()

### hasNext

bool hasNext() override;

Returns true if a call to next() will return data.

See also: Poco::Data::StatementImpl::hasNext()

### metaColumn

const MetaColumn & metaColumn(
std::size_t pos
) const override;

Returns column meta data.

See also: Poco::Data::StatementImpl::metaColumn()

### next

std::size_t next() override;

Retrieves the next row or set of rows from the resultset. Returns the number of rows retrieved. Will throw, if the resultset is empty.

See also: Poco::Data::StatementImpl::next()

### printErrors

void printErrors(
std::ostream & os
) const;

Print errors, if any.