Re: JDBC Driver Help... - Mailing list pgsql-interfaces

From Bob Kline
Subject Re: JDBC Driver Help...
Date
Msg-id Pine.LNX.4.10.10009060835200.2563-100000@rksystems.com
Whole thread Raw
In response to JDBC Driver Help...  (Eric Buschelmann <ehb@one.net>)
List pgsql-interfaces
On Mon, 4 Sep 2000, Eric Buschelmann wrote:

> I am attempting to use the following code.... However, I seem to always
> get to the SQL EXCEPTION (on the query)... [snip]
>      ResultSet rs = st.executeQuery("insert into test values(2);");
>      rs.close();
> 
> 
>      st.close();
>      con.close();
>      }
> 
>      catch (SQLException excpt0)
>          {
>       textArea2.setText("SQL EXCEPTION ON QUERY!!!");
>          }

The two most egregious problems are the fact that you're not letting the
exception objects tell you what they know, and the semicolon isn't part
of the SQL syntax -- lose it.

-- 
Bob Kline
mailto:bkline@rksystems.com
http://www.rksystems.com



pgsql-interfaces by date:

Previous
From: Bob Kline
Date:
Subject: Re: Pasing Cursors
Next
From: alec@cr464730-a.poco1.bc.home.com (Alec Smecher)
Date:
Subject: JDBC Insert row?