Neville Rowe
2003-11-19 11:37:58 UTC
I hope I'm not barking up the wrong tree here.
SquirrelSQL has always had problems for me with multiple statements - e.g.
select * into #tmp1 from table1
select * from #tmp1
where there may be (multiple) results sets interspersed with (multiple)
update counts.
Enclosed is a diff with the 1.2.b4 source code which seems to make it
work.... I hope this is useful.....
Neville Rowe
$ diff -w SQLExecuterTask.java SQLExecuterTask.orig
279,283c279,280
< int updateCount = -1;
< if (! rc)
< updateCount = _stmt.getUpdateCount();
< boolean loopAround = rc || (updateCount != -1);
< while (loopAround) {
---
< if (rc) {
---
292a290,291
< rc = _stmt.getMoreResults();
< if (! rc)
< updateCount = _stmt.getUpdateCount();
< loopAround = rc || (updateCount != -1);
< }
$
--------------------------------------------------------------------------------
The information contained herein is confidential and is intended solely for the
addressee. Access by any other party is unauthorised without the express
written permission of the sender. If you are not the intended recipient, please
contact the sender either via the company switchboard on +44 (0)20 7623 8000, or
via e-mail return. If you have received this e-mail in error or wish to read our
e-mail disclaimer statement and monitoring policy, please refer to
http://www.drkw.com/disc/email/ or contact the sender.
--------------------------------------------------------------------------------
SquirrelSQL has always had problems for me with multiple statements - e.g.
select * into #tmp1 from table1
select * from #tmp1
where there may be (multiple) results sets interspersed with (multiple)
update counts.
Enclosed is a diff with the 1.2.b4 source code which seems to make it
work.... I hope this is useful.....
Neville Rowe
$ diff -w SQLExecuterTask.java SQLExecuterTask.orig
279,283c279,280
< int updateCount = -1;
< if (! rc)
< updateCount = _stmt.getUpdateCount();
< boolean loopAround = rc || (updateCount != -1);
< while (loopAround) {
---
if (rc)
{
288c285{
< if (rc) {
---
292a290,291
while (rs != null)
{
324a324,330{
if (_stmt.getMoreResults())
{
rs = _stmt.getResultSet();
}
else
{
338a345,346{
rs = _stmt.getResultSet();
}
else
{
}
}
346,350d353}
< rc = _stmt.getMoreResults();
< if (! rc)
< updateCount = _stmt.getUpdateCount();
< loopAround = rc || (updateCount != -1);
< }
$
--------------------------------------------------------------------------------
The information contained herein is confidential and is intended solely for the
addressee. Access by any other party is unauthorised without the express
written permission of the sender. If you are not the intended recipient, please
contact the sender either via the company switchboard on +44 (0)20 7623 8000, or
via e-mail return. If you have received this e-mail in error or wish to read our
e-mail disclaimer statement and monitoring policy, please refer to
http://www.drkw.com/disc/email/ or contact the sender.
--------------------------------------------------------------------------------