I have created a form in OpenOffice.org.Base 3.1.0 in connection with a table in a Postgresql-Database.
This table includes a column named "id" which is the Primary Key (Data type "numeric"). The default value is "nextval('id_seq'::regclass)". "id_seq" is a Sequenze.
Now it's possible to add a new value with auto-increment using the postgresql Admin-Tool.
But if I wan't to add a new value using my form in Base the system shows an alert describing, that there's a failure with the ResultSet and I have to call "next".
Whats wrong?
[Solved] Auto-Increment on PrimaryKey with Postgresql
[Solved] Auto-Increment on PrimaryKey with Postgresql
Last edited by Hagar Delest on Wed Aug 10, 2011 11:28 am, edited 1 time in total.
Reason: tagged [Solved].
Reason: tagged [Solved].
OpenOffice 3.1.0
Windows XP
Windows XP
Re: Auto-Increment on PrimaryKey with Postgresql
In the meantime I solved the problem.
Obviously the Data type of the Primary Key should be "serial" or "bigserial". If you do so the value of "Default value" is automatically written (For example: "nextval('"Table1_id_seq"'::regclass)").
Obviously the Data type of the Primary Key should be "serial" or "bigserial". If you do so the value of "Default value" is automatically written (For example: "nextval('"Table1_id_seq"'::regclass)").
OpenOffice 3.1.0
Windows XP
Windows XP