Re: [Squirrel-sql-develop] Stored procedure with multiple result sets
A Java SQL client for any JDBC compliant database
Brought to you by:
colbell,
gerdwagner
From: Rowe, N. <Nev...@dk...> - 2009-06-15 10:05:27
|
Hi everyone, I've just checked in a fix for this. It certainly now works for my usecase below, and for other usages I could test. There is a comment in the code stating the original problems came from the Intersystems Cache Driver - I don't know that so couldn't test specifically that however I think it should still work for that. Neville ________________________________ From: Rowe, Neville Sent: 05 June 2009 15:11 To: squ...@li... Subject: Stored procedure with multiple result sets Hi everyone, I've been running into a problem with stored procedures which return multiple results sets when there are updates between each select statement. On at least MS SQL Server, Sybase ASE and Sybase IQ (I've tested on these three platforms) the following stored proc should return two results sets however Squirrel is missing out the second set. drop procedure nprTest; create procedure nprTest as begin create table #tmp1 (tmpCol int) insert into #tmp1 values(1) select count(*) from #tmp1 insert into #tmp1 values(2) select count(*) from #tmp1 end; exec nprTest; Note it is the existence of the insert between the two select statements which is causing this to happen - two sets are displayed if the insert is missing. The error seems to be in processQuery in net.sourceforge.squirrel_sql.client.session.SQLExecuterTask - the notes in the source indicate this has been problematic in the past, and indeed there are significant changes from the code I originally contributed for v1.2beta5...... Having had a quick glance the purpose of some of the current code is not clear to me. So before I try and work out a good solution to this, anyone else have any opinions or test cases which the existing code is supposed to work around ? Thanks, Neville This e-mail is confidential and the information contained in it may be privileged. It should not be read, copied or used by anyone other than the intended recipient. If you have received it in error, please contact the sender immediately by telephoning (+44 (0)20 7623 8000) or by return email, and delete the e-mail and do not disclose its contents to any person. We believe, but do not warrant, that this e-mail and any attachments are virus free, but you must take full responsibility for virus checking. Please refer to http://www.dresdnerkleinwort.com/disc/email/ and read our e-mail disclaimer statement and monitoring policy. Dresdner Kleinwort is a brand and trading name of the Commerzbank group and operates through Commerzbank AG, Dresdner Kleinwort Limited and their affiliated or associated companies. Commerzbank AG is a company incorporated in Germany with limited liability and registered in England (registered no. FC008139, place of business 60 Gracechurch Street, London EC3V 0HR) and is authorised by Bundesanstalt fuer Finanzdienstleistungsaufsicht (BaFin) and authorised and subject to limited regulation by the Financial Services Authority (FSA). Dresdner Kleinwort Limited is a company incorporated in England with limited liability (registered no. 551334, registered office 30 Gresham Street, London EC2V 7PG) and is authorised and regulated by the FSA. Details about the extent of our authorisations and regulation are available on request. |