freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] SQL_NO_DATA or SQL_SUCCESS
- Date: Wed, 27 Feb 2008 19:35:42 -0500
Peter Deacon wrote:
> > (I do not know what a "searched update" is. I guess it means one with
> > a WHERE clause. If I issue "UPDATE tablename SET columname = 0" on a
> > table with zero rows, it affects zero rows. What should the driver
> > return then?)
>
> Yea, searched updates are exactly that.
Hi Peter,
What should I expect if the following are executed as two batches?
CREATE TABLE B (b int)
then
DELETE FROM B
It's not "searched", but it affects no rows. SQL_SUCCESS or SQL_NO_DATA?
It's very hard for me to believe there's any *point* in distinguishing
cases like this. It smells like documentation to cover a bug, not a
design choice.
If you want to know if there's a resultset, examine at the column count.
If you want to know if rows were affected, examine the rowcount. The
purpose of SQL_NO_DATA is (obviously, if you ask me) to let you know
something else: when you've read the last row.
--jkl
-
[freetds] SQL_NO_DATA or SQL_SUCCESS,
Frediano Ziglio, 02/24/2008
-
Re: [freetds] SQL_NO_DATA or SQL_SUCCESS,
Peter Deacon, 02/24/2008
-
Re: [freetds] SQL_NO_DATA or SQL_SUCCESS,
ZIGLIO, Frediano, VF-IT, 02/27/2008
-
Re: [freetds] SQL_NO_DATA or SQL_SUCCESS,
James K. Lowden, 02/27/2008
- Re: [freetds] SQL_NO_DATA or SQL_SUCCESS, ZIGLIO, Frediano, VF-IT, 02/27/2008
-
Re: [freetds] SQL_NO_DATA or SQL_SUCCESS,
Peter Deacon, 02/27/2008
-
Re: [freetds] SQL_NO_DATA or SQL_SUCCESS,
James K. Lowden, 02/27/2008
- Re: [freetds] SQL_NO_DATA or SQL_SUCCESS, Peter Deacon, 02/27/2008
-
Re: [freetds] SQL_NO_DATA or SQL_SUCCESS,
James K. Lowden, 02/27/2008
- Re: [freetds] SQL_NO_DATA or SQL_SUCCESS, James K. Lowden, 02/27/2008
-
Re: [freetds] SQL_NO_DATA or SQL_SUCCESS,
James K. Lowden, 02/27/2008
-
Re: [freetds] SQL_NO_DATA or SQL_SUCCESS,
ZIGLIO, Frediano, VF-IT, 02/27/2008
-
Re: [freetds] SQL_NO_DATA or SQL_SUCCESS,
Peter Deacon, 02/24/2008
Archive powered by MHonArc 2.6.24.