Re: executeQuery returns postgresql.stat.result - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: executeQuery returns postgresql.stat.result
Date
Msg-id Pine.BSO.4.56.0505011230450.1107@leary.csoft.net
Whole thread Raw
In response to executeQuery returns postgresql.stat.result  ("Nico" <nicohmail-postgresql@yahoo.com>)
List pgsql-jdbc

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<sql.length;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

pgsql-jdbc by date:

Previous
From: "Nico"
Date:
Subject: executeQuery returns postgresql.stat.result
Next
From: "Nico"
Date:
Subject: Re: executeQuery returns postgresql.stat.result