[freetds] SQLRowCount failing after prepare and execute
freddyz77 at tin.it
Fri Feb 13 14:57:33 EST 2004
Il ven, 2004-02-13 alle 20:23, Matthew A. Davis ha scritto:
> 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.)
delete, insert and update have the same behavior... if you use
SQLPrepare with sql server you are not able to get row count.
More information about the FreeTDS