SQLDBC::PreparedStatement::setResultSetFetchSize

Prototypes

void SQLDBC::PreparedStatement::setResultSetFetchSize(SQLDBC_Int2 rows);

Description

Fixe la taille des tableaux des résultats à rows lignes.

Exemple

#include <SQLDBC.h>

static SQLDBC_Statement *hOrdreSql;
static SQLDBC_PreparedStatement *hOrdreSql2;
static long E;
static SQLINTEGER IndicateurE;
static char TableC[256][20];
static SQLINTEGER IndicateurTableC[256];
static SQLINTEGER NbEnregistrements;

...
/* Resultat unitaire. */
if (hOrdreSql->bindColumn(1, SQLDBC_HOSTTYPE_INT4, (SQLPOINTER)&E, &IndicateurE, sizeof(long))!=SQLDBC_OK) ...
if (hOrdreSql->execute("select empno from emp where ename='SCOTT';")!=SQLDBC_OK) ...
if (hOrdreSql->next()!=SQDBC_OK) ...
/* Resultat en tableau. */
if (hOrdreSql->bindColumn(1, SQLDBC_HOSTTYPE_ASCII, (void *)TableC, TableIndicateurC, sizeof(char)*20)!=SQLDBC_OK) ...
hOrdreSql2->setResultSetFetchSize(256);
...
if (hOrdreSql->execute()!=SQLDBC_OK) ...
if (hOrdreSql2->next()!=SQLDBC_OK) ...
NbEnregistrements=hOrdreSql2->getResultCount();
...

Voir aussi

SQLDBC::PreparedStatement::bindColumn lier un résultat d'un ordre Sql. SQLDBC::PreparedStatement::execute pour exécuter un ordre Sql.