#define SQL_TEXT Latin_Text
#include<sqltypes_td.h>
#include<string.h>
void getPairs ( int *NumPairs, char sqlstate[6] )
{
FNC_QB_Pair_t *pairPtr;
char *QBandBuf;
int QBLen;
QBandBuf = FNC_malloc(FNC_MAXQUERYBANDSIZE);
if (QBandBuf == NULL)
{
strcpy(sqlstate, "U0004");
strcpy((char *) error_message, "malloc failed");
}
else
{
FNC_GetQueryBand(QBandBuf, FNC_MAXQUERYBANDSIZE, &QBLen);
if (QBLen > 0)
{
pairPtr = FNC_GetQueryBandPairs(QBandBuf, QB_FIRST, NumPairs);
if (*NumPairs > 0)
FNC_free(pairPtr);
}
strcpy(sqlstate, "00000");
}
FNC_free(QBandBuf);
return;
}