[freetds] dblastrow?
Geoff Wong
geoff at shattered.org
Wed Jul 21 03:31:09 EDT 2004
dblastrow() crashes in the following code:
--------
BOOL SQLSVRDB_OpenProcCursor(DBPROCESS *dbProc)
{
LOG_PROC_MSG( "SQLSVRDB_OpenProcCursor(): dbProc=" << dbProc ) ;
if (dbrpcsend(dbProc) == FAIL)
{
LOG_PROC_MSG( "ERROR: dbrpcsend() failed." ) ;
return FALSE;
}
if (dbsqlok(dbProc) == FAIL)
{
LOG_PROC_MSG( "ERROR: dbsqlok() failed." ) ;
return FALSE;
}
if (dbresults(dbProc) == FAIL)
{
LOG_PROC_MSG( "dbresults() failed." ) ;
return FALSE;
}
#if 1
printf("OpenProcCursor (rows=%d,cols=%d)\n", dblastrow(dbProc), dbnumcols(dbProc));
#endif
return TRUE;
}
--------
It crashes here:
DBINT
dblastrow(DBPROCESS * dbproc)
{
TDSRESULTINFO *resinfo;
TDSSOCKET *tds;
tds = (TDSSOCKET *) dbproc->tds_socket;
line 5872 **** resinfo = tds->res_info;
return resinfo->row_count;
Should it work?
Or am I doing something wrong?
Even if I'm doing something wrong .. I don't think it should crash here.
Geoff
More information about the FreeTDS
mailing list