X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DB2125368C for ; Sun, 1 May 2005 14:59:50 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 09665-06 for ; Sun, 1 May 2005 17:59:41 +0000 (GMT) Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by svr1.postgresql.org (Postfix) with ESMTP id 834CF54304 for ; Sun, 1 May 2005 14:59:39 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 9094C30952; Sun, 1 May 2005 19:57:56 +0200 (MET DST) From: "Nico" X-Newsgroups: pgsql.interfaces.jdbc Subject: Re: executeQuery returns postgresql.stat.result Date: Sun, 1 May 2005 19:59:09 +0200 Organization: Hub.Org Networking Services Lines: 37 Message-ID: References: X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 To: pgsql-jdbc@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=3.359 tagged_above=0 required=5 tests=FORGED_YAHOO_RCVD, PRIORITY_NO_NAME X-Spam-Level: *** X-Archive-Number: 200505/3 X-Sequence-Number: 12834 The batch statement is ONLY used in case of an update, insert or delete command. When a select command is used, there is no batch used, as you can see in my code. Nico. "Kris Jurka" schreef in bericht news:Pine.BSO.4.56.0505011230450.1107@leary.csoft.net... > > > On Sun, 1 May 2005, Nico wrote: > >> sql="select * from \"qryMonthsYears\""; >>... >> if(strstatement.startsWith("SELECT")) >>... >> else >> { >> connection.setAutoCommit(false); >> String [] sql=strstatement.split(";"); >> for(int teller=0;teller> statement.addBatch(sql[teller]+";"); >> statement.executeBatch(); > > Your own parsing logic is busted and is trying to execute a select in a > batch statement, which is not legal. > > Kris Jurka > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >