[freetds] dblastrow?
James K. Lowden
jklowden at schemamania.org
Wed Jul 21 20:57:58 EDT 2004
On Wed, 21 Jul 2004, Geoff Wong <geoff at shattered.org> wrote:
>
> dblastrow() crashes in the following code:
>
...
> if (dbrpcsend(dbProc) == FAIL)
...
> if (dbsqlok(dbProc) == FAIL)
...
> if (dbresults(dbProc) == FAIL)
...
>
> 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;
I think it must depend on the SQL (or something). That calling sequence
is completely standard and should always work. src/dblib/unittests/rpc.c
does exactly that (and works). Perhaps your query returns no rows? Not
that that should be a problem....
If you could send post a complete [non]working program that exposes this
bug, perhaps a modified unit test, I'd be happy to look into it further.
Other suggestions welcome, too. ;-)
--jkl
More information about the FreeTDS
mailing list