[freetds] SQLFetch broken in HEAD?

Lowden, James K james.k.lowden at alliancebernstein.com
Wed Jul 5 18:57:40 EDT 2006


From: Frediano Ziglio
Sent: Tuesday, July 04, 2006 4:25 PM
> Il giorno mar, 04/07/2006 alle 11.46 -0400, James K. Lowden ha
scritto: 
> > ZIGLIO, Frediano, VF-IT wrote:
> > > > 
> > > > > > > > I added a new unit test, src/odbc/unittests/rpc.c.  
> >
> > I don't understand why SQLFetch returns SQL_NO_DATA_FOUND the first
time
> > it's called.  How is that "correct behavior for ODBC"?  What else am
I
> > supposed to do to get the data?  
> > 
> 
> This is procedure body
> 
> select @null_input = max(convert(varchar(30), name)) from systypes 
> select @first_type = min(convert(varchar(30), name)) from systypes
> select name from sysobjects where 0=1
> select distinct convert(varchar(30), name) as 'type'  from systypes
>   where name in ('int', 'char', 'text')
> select @nrows = @@rowcount
> select distinct convert(varchar(30), name) as name  from sysobjects
where type = 'S'
> return 42
> 
> first select return nothing (just an ignored DONEINPROC)
> second select return nothing
> third select (select name from sysobjects where 0=1) returns no row so
> SQLFetch return NO_DATA

First, my apologies.  I didn't realize I needed to call SQLMoreResults.
SQLFetch is OK.  I committed a better version of my test.  

Second, I believe result set processing is seriously broken.  Please see
my next message for details.  

Regards, 

--jkl


-----------------------------------------
The information contained in this transmission may be privileged and
confidential and is intended only for the use of the person(s) named
above. If you are not the intended recipient, or an employee or agent responsible
for delivering this message to the intended recipient, any review, dissemination,
distribution or duplication of this communication is strictly prohibited. If you are
not the intended recipient, please contact the sender immediately by reply e-mail
and destroy all copies of the original message. Please note that we do not accept
account orders and/or instructions by e-mail, and therefore will not be responsible
for carrying out such orders and/or instructions.  If you, as the intended recipient
of this message, the purpose of which is to inform and update our clients, prospects
and consultants of developments relating to our services and products, would not
like to receive further e-mail correspondence from the sender, please "reply" to the
sender indicating your wishes.  In the U.S.: 1345 Avenue of the Americas, New York,
NY 10105.



More information about the FreeTDS mailing list