Skip to Content.
Sympa Menu

freetds - Re: [freetds] SQLRowCount failing after prepare and execute

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Matthew A. Davis" <azami AT speakeasy.net>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] SQLRowCount failing after prepare and execute
  • Date: Fri, 13 Feb 2004 14:23:12 -0500



Frediano Ziglio wrote:
>
> Il gio, 2004-02-12 alle 22:28, Matthew A. Davis ha scritto:
> > When I send an UPDATE using SQLExecDirect(), then check the number of
> > affected rows, all is fine. When I send the same command using
> > SQLPrepare() and SQLExecute(), checking the number of effected rows fails
> > with SQLState 24000 (Invalid Cursor).
>
> Hi Matthew!
> I don't know if SQLRowCount should return error or no_row_count however
> you won't be able to read row counts using SQLPrepare and insert. This
> behavior reflect wire protocol and it's compatible with Microsoft ODBC.

Hi Freddy77,

Thanks for getting back to me. I am doing an UPDATE, not an INSERT. Getting
row counts for UPDATES seems like a very important thing. My understanding
is that ODBC requires row counts to be available for UPDATE and DELETE.
(This makes sense - if you're inserting, you should know how many records
you are inserting, and if you're selecting, you can count them as you fetch
them.)

-Matthew Davis
--
Matthew A. Davis ( mailto:azami AT speakeasy.net )
http://www.speakeasy.net/~azami

"It's not always popular upholding the Constitution,
but it's always the right thing to do."
-Senator Patrick J. Leahy (D-Vt)




Archive powered by MHonArc 2.6.24.

Top of Page