[freetds] empty results on multiple step query

Frediano Ziglio freddyz77 at tin.it
Wed Jul 7 02:27:42 EDT 2004


Il mar, 2004-07-06 alle 23:15, Adrian Lattke ha scritto:
> I applied the patch, and everything still works. However, I still had to
> implement the code with DBD::Sybase to recognize 
> 
> $query->{syb_result_type} == 4046
> 
> .
> 
> Thank you all,
> -Adrian
> 

Well, this is another token and another problem. ODBC filter these
tokens too however we must doing so cause even proprietary ODBC skip
them. For dblib/ctlib I don't know. However there is a server workaround
for this. If you add SET NOCOUNT ON/SET NOCOUNT OFF to your store
procedure DONE (4046) it's not returned. Just an example

CREATE PROC sp_test
AS
	INSERT INTO test(i) VALUES(5)
	SELECT * FROM test
GO

This procedure return
DONE
ROWS
DONE

If you change in

CREATE PROC sp_test
AS
	SET NOCOUNT ON
	INSERT INTO test(i) VALUES(5)
	SET NOCOUNT OFF
	SELECT * FROM test
GO

This procedure now return
ROWS
DONE

freddy77





More information about the FreeTDS mailing list