freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
RE: [freetds] SQLRowCount failing after prepare and execute
- From: "Thompson, Bill D (London)" <bill_d_thompson AT ml.com>
- To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] SQLRowCount failing after prepare and execute
- Date: Mon, 16 Feb 2004 12:51:40 -0000
Freddy,
might we be able to use that short on the DONEINPROC to help us (remember
the RAISERROR thing ?)
If you send me the complete output packet from a prepared
"select * from #tmp where i=2 delete from #tmp"
and a prepared
"delete from #tmp select * from #tmp where i=2"
I might be able to find out some values :-)
Bill
> -----Original Message-----
> From: ZIGLIO, Frediano, VF-IT [SMTP:Frediano.Ziglio AT vodafone.com]
> Sent: Monday, February 16, 2004 12:40 PM
> To: FreeTDS Development Group
> Subject: RE: [freetds] SQLRowCount failing after prepare and execute
>
> >
> > 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
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
==============================================================================
If you are not an intended recipient of this e-mail, please notify
the sender, delete it and do not read, act upon, print, disclose,
copy, retain or redistribute it.
Click here for important additional terms relating to this e-mail.
<http://www.ml.com/email_terms/>
==============================================================================
-
Re: [freetds] SQLRowCount failing after prepare and execute
, (continued)
-
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,
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,
Frediano Ziglio, 02/13/2004
Archive powered by MHonArc 2.6.24.