Hello to all,
i get the following error message from interbase
when I execute the following code:
The SQL Statement I've executed was as follows:
Can anybody help to find a solution? I'll have only the fetch columns.
Much thanks and best Regards
NoRulez
i get the following error message from interbase
Code:
attempt to fetch past the last record in a record stream
when I execute the following code:
Code:
int fetch_stat = 0;
if (isc_dsql_execute2(m_connStatus, &m_transaction, &m_statement, dialect, in_sqlda, out_sqlda)) {
//if (isc_dsql_execute2(m_connStatus, &m_transaction, &m_statement, dialect, in_sqlda, NULL)) {
cout << endl;
isc_print_status(m_connStatus);
long *pVector;
char msg[1024];
string err_message = "";
pVector = m_connStatus;
isc_interprete(msg, &pVector);
err_message = msg;
msg[0] = '-';
while(isc_interprete(msg + 1, &pVector))
err_message += msg;
cerr << err_message << endl;
}
int fetch_stat = 0;
while ((fetch_stat = isc_dsql_fetch(m_connStatus, &m_statement, 1, out_sqlda)) == 0) {
for (i = 0; i < out_sqlda->sqld; i++) {
process_column(&out_sqlda->sqlvar[i]);
}
}
if (fetch_stat != 100L) { // isc_dsql_fetch returns 100 if no more rows remain to be retrieved
isc_print_status(m_connStatus);
long *pVector;
char msg[1024];
string err_message = "";
pVector = m_connStatus;
isc_interprete(msg, &pVector);
err_message = msg;
msg[0] = '-';
while(isc_interprete(msg + 1, &pVector))
err_message += msg;
cerr << err_message << endl;
}
Code:
SELECT col1, col2, col3, FROM my_table WHERE id>=? AND id <?
Can anybody help to find a solution? I'll have only the fetch columns.
Much thanks and best Regards
NoRulez