[freetds] No second result set is returned using multiple statements

Norbert Sendetzky norbert at linuxnetworks.de
Tue Jun 23 11:18:50 EDT 2009

Hi all

A contributor to OpenDBX pointed me to a problem which I tracked down to 

When sending two statements (a select and an insert statement) in a single SQL 
string to a MS SQL Server, FreeTDS only returns one result set for the select 
statement. If the same statements are reversed in the SQL string (first 
insert, then select), there are two result sets returned as expected, e.g.

INSERT INTO test (id,name) VALUES (1,'test1'); SELECT * FROM test
-> two result sets

SELECT * FROM test; INSERT INTO test (id,name) VALUES (2,'test2')
-> only one result set

I've also tested with libsybdb from Sybase ASE to be sure and it returns 
always two result sets.

OpenPGP public key

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20090623/fe1e9324/attachment.bin 

More information about the FreeTDS mailing list