[freetds] SQLFetch broken in HEAD?

James K. Lowden jklowden at freetds.org
Tue Jul 4 11:46:54 EDT 2006

ZIGLIO, Frediano, VF-IT wrote:
> > 
> > > > > > I added a new unit test, src/odbc/unittests/rpc.c.  
> > 
> > I'm interested to know if it's right and if it works for you.  :-)
> Well... it depends on what is the expected behavior... written as it's
> written currently it write
>   error: expected at least 15 rows to be returned, found 0
> and it exit with 1. Well, this is the correct behavior for ODBC, but I
> think that intention for any tests should be return 0 for expected
> behavior...

It returns 1 because that's *not* expected.  Not by me, anyway.  

The SELECT statement is "SELECT name from systypes".  I use the same query
in src/dblib/unittests/rpc.c.  It should return at least 15 rows (24 on a
Microsoft server).  

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?  


More information about the FreeTDS mailing list