freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
RE: [freetds] SQLRowCount failing after prepare and execute
- From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] SQLRowCount failing after prepare and execute
- Date: Mon, 16 Feb 2004 13:39:58 +0100
>
> Freddy,
>
> An interesting problem then.
>
> Do we make our ODBC implementation behave like another
> (clearly buggy) implementation for the sake of
> "compatibility" ? or do we do the job properly ?
>
> Bill
>
You are right!
However the problem here is that with MS ODBC you are able to read rows
from a prepared delete/update/insert while using FreeTDS no... MS
solution is quite wrong, I must admit but works... This is a sligtly
difference but some workaround should be taken... Perhaps the best
solution (for compatibility and others) is:
- ignore DONEINPROC token if we have no rows (as we do now) but cache
row count
- if we get last DONE/DONEPROC and we have a cached row count return
another (empty recordset)
So
create table #tmp (i int)
insert into #tmp values(1)
Issuing this query (using SQLPrepare)
select * from #tmp where i=2 delete from #tmp
will return two recordset
- 1 column with 0 rows (select)
- 0 columns with 1 row (delete)
However this query
delete from #tmp select * from #tmp where i=2
will return just a recordset
- 1 column with 0 rows (select)
This cause we are unable to know if the first DONEINPROC came from a
trigger or whatever... Does this solution seems reasonable?
Freddy77
-
Re: [freetds] SQLRowCount failing after prepare and execute
, (continued)
-
Re: [freetds] SQLRowCount failing after prepare and execute,
Matthew A. Davis, 02/13/2004
-
Re: [freetds] SQLRowCount failing after prepare and execute,
Frediano Ziglio, 02/13/2004
-
Re: [freetds] SQLRowCount failing after prepare and execute,
Matthew A. Davis, 02/13/2004
- Re: [freetds] SQLRowCount failing after prepare and execute, James K. Lowden, 02/13/2004
-
Re: [freetds] SQLRowCount failing after prepare and execute,
Matthew A. Davis, 02/13/2004
-
Re: [freetds] SQLRowCount failing after prepare and execute,
Frediano Ziglio, 02/13/2004
-
Re: [freetds] SQLRowCount failing after prepare and execute,
Thompbil18, 02/14/2004
-
Re: [freetds] SQLRowCount failing after prepare and execute,
Frediano Ziglio, 02/14/2004
- Re: [freetds] SQLRowCount failing after prepare and execute, Frediano Ziglio, 02/14/2004
-
Re: [freetds] SQLRowCount failing after prepare and execute,
Frediano Ziglio, 02/14/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, Thompson, Bill D (London), 02/16/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, ZIGLIO, Frediano, VF-IT, 02/16/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, Thompson, Bill D (London), 02/16/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, ZIGLIO, Frediano, VF-IT, 02/16/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, Thompson, Bill D (London), 02/16/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, ZIGLIO, Frediano, VF-IT, 02/16/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, Thompson, Bill D (London), 02/16/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, ZIGLIO, Frediano, VF-IT, 02/16/2004
-
RE: [freetds] SQLRowCount failing after prepare and execute,
Thompson, Bill D (London), 02/17/2004
- Re: [freetds] SQLRowCount failing after prepare and execute, Matthew A. Davis, 02/17/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, ZIGLIO, Frediano, VF-IT, 02/17/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, ZIGLIO, Frediano, VF-IT, 02/17/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, Lowden, James K, 02/17/2004
-
Re: [freetds] SQLRowCount failing after prepare and execute,
Matthew A. Davis, 02/13/2004
Archive powered by MHonArc 2.6.24.