🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8508

another new Connection for two Resul?

#8508
From: Stephen Zeng
Date: Fri, 16 Mar 2001 01:55
26 lines
1537 bytes
   Connection con=DriverManager.getConnection("jdbc:odbc:expresso","sa","");
   Statement sqlstr=con.createStatement();
   Statement trasql=con.createStatement();

   ResultSet firstrs=sqlstr.executeQuery("....");

    while (firstrs.next()) {

        System.out.println(firstrs.getString(1));


        //  next result set
        ResultSet secondrs=sqlstr.executeQuery("...");

        while (secondrs.next()) {
            System.out.println(secondrs.getString(1));

// error: Connection is busy with results for another Statment,
// Does it means I need create New Connection for each ResultSet?  if that
is the case,
// it will  occupy large Server resource?
// Or is there any better method?

            }

    }
Technical Details
Message-ID: <3ab17350_1@dnews>
Path: arc1-ca.pugleaf.net!pubnews.netcom.net.uk!diablo.netcom.net.uk!netcom.net.uk!fr.clara.net!heighliner.fr.clara.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!211.159.29.2

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,706e71a4e5ab8522
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-17 07:55:17 PST
From: "Stephen Zeng" <chinafax1@cmmail.com>
Newsgroups: borland.public.jbuilder.java.language
Subject: another new Connection for two Resul?
Date: Fri, 16 Mar 2001 09:55:48 +0800
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
NNTP-Posting-Host: 211.159.29.2
Message-ID: <3ab17350_1@dnews>
X-Trace: 15 Mar 2001 17:58:40 -0800, 211.159.29.2
Path: arc1-ca.pugleaf.net!pubnews.netcom.net.uk!diablo.netcom.net.uk!netcom.net.uk!fr.clara.net!heighliner.fr.clara.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!211.159.29.2