Skip to Content.
Sympa Menu

freetds - dbsqlexec doesn't cleanup on error

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Mark J. Lilback" <mark AT lilback.com>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: dbsqlexec doesn't cleanup on error
  • Date: Fri, 22 Jun 2001 15:16:37 -0400


If dbsqlexec returns an error, it appears you have to call dbresults or the next results will be in an incorrect state.

According to the OpenClient DB/Library C Reference (10.0 release), this is not the expected behavior -- calling dbresults is only required if dbsqlexec returns SUCCESS.

I'm seeing this by sending the query "select id,name from foo where id < 3," twice and looking at the values in the debugger.

Can someone else confirm this behavior?

I'm seeing different tds->in_pos values, even though the query returns the same packet from the server. Also, I end up with dbproc->empty_res_hack set to 1.

What is dbproc->empty_res_hack for, anyway? It doesn't sound good, especially since I'm seeing it set when I have problems.

Thanks.

--

__________________________________________________________________________
"The best assumption to have
Mark J. Lilback is that any commonly held
<mark AT lilback.com> belief is wrong." -- Ken Olsen,
http://www.lilback.com/ founder, Digital Equip. Corp.




Archive powered by MHonArc 2.6.24.

Top of Page