From: | "Paul Espin Huayamabe" <pespin(at)cees(dot)edu(dot)ec> |
---|---|
To: | <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | ayuda postgres+java |
Date: | 2005-07-21 15:50:46 |
Message-ID: | 200507211536.j6LFatUp028242@mail.cees.edu.ec |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Esto me pasa al tartar de ingresar valores dentro de la tabla, esta tabla
tiene un campo secuencial
CREATE SEQUENCE public.sec_prueba1_pk INCREMENT 1 MINVALUE 1 MAXVALUE
9223372036854775807 CACHE 1;
SELECT setval('public.sec_prueba1_pk', 1);
GRANT ALL ON TABLE public.sec_prueba1_pk TO PUBLIC;
GRANT ALL ON TABLE public.sec_prueba1_pk TO postgres;
La tabla esta definida así.:
CREATE TABLE public.prueba1 (
campo1 int8 DEFAULT nextval('sec_prueba1_pk'::text) NOT NULL,
campo2 int8,
CONSTRAINT "UK_campo2" UNIQUE (campo2),
CONSTRAINT "PK_tabla1" PRIMARY KEY (campo1)
) WITH OIDS;
GRANT ALL ON TABLE public.prueba1 TO PUBLIC;
GRANT ALL ON TABLE public.prueba1 TO postgres;
Metodo de java
public static void main(String[] args) {
AdmBase p = new AdmBase("192.168.8.1","dbNombre");
String ss = "INSERT INTO prueba1 (campo2) Values (1) ";
p.ejecutaInsert(ss);
System.out.println(p.getIntKeyGenerada());
Error
AdmBase dice: Parametro dbName = dbNombre
AdmBase dice: Parametro userId = postgres
AdmBase dice: Parametro password = postgres
AdmBase dice: This method is not yet implemented.
Pool dice: conexion a eliminar. #: 0
NO ENTIENDO EL ERROR, EL METODO FUNCIONA SI LA TABLA NO LE ASIGNAEL
SECIENCIAL, ES DECIR YO MANEJO LOS INDICES, PERO NECESITO HACERLO CON
SECUENCIAL, AL MOMENTO DE CAMBIAR LAS COSAS ME SALE EL ERROR (This method is
not yet implemented).
QUE PUEDO REVISAR?????
Paul Espin H.
Departamento de Sisitemas
Centro de Estudios Espirìtu Santo
From | Date | Subject | |
---|---|---|---|
Next Message | Ricardo Frydman (Eureka!) | 2005-07-21 15:54:11 | Re: Licencia BSD? |
Previous Message | Nicolas Sorich | 2005-07-21 15:39:06 | Re: " duda con sentencia" |