SQLDBC::PreparedStatement::getResultCount

Prototypes

SQLDBC_Int4 SQLDBC::PreparedStatement::getResultCount(void);

Description

Retourne le nombre d'enregistrements lus dans les tableaux de résultat de l'ordre Sql courant.

Exemple

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

SQBDBC::PreparedStatement::next pour lire un paquet de résultats d'un ordre Sql.