freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Christopher Taylor <freetds AT kiwi.net>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: [freetds] Re: Bug: 0.62.dev
- Date: Wed, 30 Apr 2003 12:13:18 -0700
Sure.. Basically:
================================================================
...
sprintf(query, "selAffiliateCustomer %d, %d, NULL", last_customer_id,
AFFILIATE_ID);
dbcmd(dbproc1, query);
if (dbsqlexec(dbproc1) == FAIL) { printf("Execution of SQL statement
failed.\n"); dbexit(); return 1; }
if (dbresults(dbproc1) == FAIL) { printf("Execution of SQL statement
failed.\n"); dbexit(); return 1; }
dbbind(dbproc1, 1, INTBIND, -1, (BYTE *)&next_customer_id);
dbbind(dbproc1, 2, NTBSTRINGBIND, -1, (BYTE *)&db_last_change_date);
//DEBUG
printf("...begin while\n");
while (dbnextrow(dbproc1) != NO_MORE_ROWS) {
//DEBUG
printf("...in while\n");
//SOME CODE HERE
}
//DEBUG
printf("...end while\n");
dbfreebuf(dbproc1);
dbexit();
...
================================================================
The program outpus:
...begin while
...in while
and then hangs. it's actually doesn't even loop. it just stops.
--
christopher taylor
software engineer and unix demigod
e-mail: ctaylor AT kiwi.net
I have that old biological urge,
I have that old irresistible surge,
I'm hungry.
** Frediano Ziglio <freddyz77 AT tin.it> [2003-04-30 20:46:35 +0200]:
// Il mer, 2003-04-30 alle 19:20, Christopher Taylor ha scritto:
// > Language: C
// > FreeTDS Version: 0.62.dev.20030430
// > TDS protocol version: 7.0
// > Platform: FreeBSD 4.6-RELEASE
// > SQL Server: Microsoft SQL 2000
// > Bug: dbnextrow(dbproc) returning -1 (MORE_ROWS) when end of recordset
reached:
// > ie:
// >
// > while (dbnextrow(dbproc) != NO_MORE_ROWS);
// >
// > --caught in infinite loop.
// >
// > Additional notes: was running 0.61, but my applications would crash
whenever
// > an empty recordset was returned.
//
// Could you send some code to reproduce the problem ?
//
// freddy77
//
//
// _______________________________________________
// FreeTDS mailing list
// FreeTDS AT lists.ibiblio.org
// http://lists.ibiblio.org/mailman/listinfo/freetds
-
[freetds] Bug: 0.62.dev,
Christopher Taylor, 04/30/2003
-
Re: [freetds] Bug: 0.62.dev,
Frediano Ziglio, 04/30/2003
- [freetds] Re: Bug: 0.62.dev, Christopher Taylor, 04/30/2003
-
Re: [freetds] Bug: 0.62.dev,
Frediano Ziglio, 04/30/2003
Archive powered by MHonArc 2.6.24.