Re: WebDB - Using sequences

From: Edward Beemer <ebeemer_at_tas.nl>
Date: Fri, 3 Sep 1999 16:47:59 +0200
Message-ID: <7qon7p$6p0$1_at_zonnetje.nl.uu.net>


[Quoted] Hi guys,

I'm trying to get the same thing done, but with partial success. I inserted #my_seq.nextval in the default value field. This works when I'm logged on as WebDB Developer, but when a User logs in, [Quoted] the literal text 'my_seq.nextval' is presented in the edit box.

I already granted the right to select my_seq to the role the User has. Did I forget something?

While we're at it: in my case the primary key consists of two fields, one I want to enter manually (say CUSTOMER_ID) and one of which I would like to feed with a sequence (say LINE_NO). But my_seq keeps iterating from the previous value, where I would like it to start at 1 when a new CUSTOMER_ID is inserted. How do I do that?

With kind regards,
Edward Beemer

Rick Jolley wrote...

>In the default value field, use #clientid_seq

>Frans Hovenkamp wrote in message <7pbmec$lh9$1_at_zonnetje.nl.uu.net>...

>>Use a pre-insert trigger:

>>SELECT sequence_name.nextval INTO key_field FROM DUAL;
Received on Fri Sep 03 1999 - 16:47:59 CEST

Original text of this message