TIP: Servoy needs to know name of PostgreSQL SEQUENCES

Questions and answers regarding general SQL and backend databases

TIP: Servoy needs to know name of PostgreSQL SEQUENCES

Postby swingman » Wed Apr 13, 2005 2:47 pm

Hi all,

Thought I would try and save someone a great waste of time.
Scenario:

Create a database in PostgreSQL with a SERIAL primary key.

Code: Select all
CREATE SEQUENCE clients_client_id
GO
CREATE TABLE public.clients (
    client_id              int4 DEFAULT nextval('clients_client_id'),
    client_name            text NULL,
    client_new_date        date NULL,
    PRIMARY KEY(client_id)
)
GO


Start up Servoy, connect to DB.
Create a layout based on table and try to edit a record.

If saving the record fails, it may be because Servoy needs to know the name of your sequence! Edit "client_id" in servoy and add the sequence name.
User avatar
swingman
 
Posts: 1483
Joined: Wed Oct 01, 2003 10:20 am
Location: Venice / London

Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 3 guests