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 4CFB93A4ED9 for ; Sat, 22 Jan 2005 13:32:48 +0000 (GMT) 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 37693-02 for ; Sat, 22 Jan 2005 13:32:43 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 55E593A4ED5 for ; Sat, 22 Jan 2005 13:32:46 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.13.1/8.13.1) with ESMTP id j0MDWeDW090260 for ; Sat, 22 Jan 2005 13:32:40 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.13.1/8.13.1/Submit) id j0MD3stD085390 for pgsql-jdbc@postgresql.org; Sat, 22 Jan 2005 13:03:54 GMT (envelope-from news) From: "Nico" X-Newsgroups: pgsql.interfaces.jdbc Subject: Relation "autonummeringl2" does not exist Date: Sat, 22 Jan 2005 14:03:40 +0100 Organization: Hub.Org Networking Services Lines: 31 Message-ID: X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original To: pgsql-jdbc@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.348 tagged_above=0 required=5 tests=ALL_TRUSTED, AWL, FORGED_YAHOO_RCVD, PRIORITY_NO_NAME, UPPERCASE_25_50 X-Spam-Level: * X-Archive-Number: 200501/214 X-Sequence-Number: 12094 Hello, as I have told, I am making a servlet that generates a menu and one that changes it(deleting, adding & updating items). However it returns an error: Relation "autonummeringl2" does not exist autonummeringL2 is the name of a sequence that raises a field by 1 each time it is called. Any suggestions are welcome. Nico. Here is the table creation sql: CREATE TABLE "tblMenuL2" ( "MenuL2ID" integer DEFAULT nextval('autonummeringL2'::text) NOT NULL, "MenuL1ID" integer NOT NULL, "MenuL2Name" character varying(50) NOT NULL, "MenuL2Page" character varying(50), "MenuL2Order" smallint NOT NULL ); ALTER TABLE ONLY "tblMenuL2" ADD CONSTRAINT "pkMenuL2ID" PRIMARY KEY ("MenuL2ID"); ALTER TABLE ONLY "tblMenuL2" ADD CONSTRAINT "fkMenuL1ID" FOREIGN KEY ("MenuL1ID") REFERENCES "tblMenuL1"("MenuL1ID") ON UPDATE CASCADE ON DELETE CASCADE; ALTER TABLE ONLY "tblMenuL2" ADD CONSTRAINT "MenuL2Volgorde" UNIQUE ("MenuL2ID", "MenuL1ID"); Here is the update query & insert. It happens during the insert query.: UPDATE "tblMenuL2" SET "MenuL2Order"="MenuL2Order"+1 WHERE "MenuL2Order">=5; INSERT INTO "tblMenuL2"("MenuL1ID", "MenuL2Name", "MenuL2Page", "MenuL2Order") VALUES(1, 'naam', 'pagina', 5);