pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vidas Makauskas <v.makauskas@pzu.lt>
To: pgsql-jdbc@postgresql.org
Subject: No Primary Keys (pg7.4.2 on SLES9)
Date: Mon, 3 Apr 2006 11:30:00 +0300
Message-ID: <000301c656f8$cc3dd400$8400010a@pzu.lt> (raw)

Hi,

I get error NO PRIMARY KEY from prs.moveToInsertRow();

Postgres 7.4.2 on with /usr/share/pgsql/pg73b1jdbc3.jar

All packets from the same Suse Standard Enterprise Server 9 CD's.

Bellow full test.java source.

Best regards

 

import java.sql.*;

 

public class

testas

{

  private static Connection pg;

 

public static void

main(String [] args)

{

 try {

  Class.forName("org.postgresql.Driver").newInstance();

 }

 catch (Exception e) {

 }

 try {

  pg =
DriverManager.getConnection("jdbc:postgresql://192.168.2.3/db","vidas","");

  Statement st = pg.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);

  st.executeUpdate("CREATE TABLE public.testas (loid integer PRIMARY KEY)
WITHOUT OIDS");

  ResultSet prs = st.executeQuery("SELECT p.* FROM public.testas p");

//prs.next();

prs.moveToInsertRow();

//System.out.println(prs.getConcurrency());

 }

 catch (SQLException e) {

  System.out.println("err: "+e);

  e.printStackTrace();

 }

}

 

}

view thread (3+ messages)  latest in thread

Message-ID: <000301c656f8$cc3dd400$8400010a@pzu.lt>
Permalink:  ../000301c656f8$cc3dd400$8400010a@pzu.lt/
Also on:    postgresql.org/message-id/000301c656f8$cc3dd400$8400010a@pzu.lt

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: v.makauskas@pzu.lt
  Subject: Re: No Primary Keys (pg7.4.2 on SLES9)
  In-Reply-To: <000301c656f8$cc3dd400$8400010a@pzu.lt>
  References: <000301c656f8$cc3dd400$8400010a@pzu.lt>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox