Re: A unique counter

From: Simon Hedges <shedges_at_hhhh.freeserve.co.uk>
Date: Sat, 16 Oct 1999 14:46:36 +0100
Message-ID: <7u9vgu$2lo$1_at_news5.svr.pol.co.uk>


I would recommend that you don't use Rowids. Under certain circumstances (e.g. when a database is exported and re-imported) Rowids will change. This means that the Rowid figures that you originally store may be duplicated later on. As Tom proposes, it's best to use an Oracle sequence.

You can set an Oracle sequence to be generated as the default value for a column from within Designer, or you can write a DB trigger to assign it, or you can use your client code to assign it. Or all 3 in combination!

Simon Hedges
Gloucester
UK

Tom Verhagen <tverhage_at_bart.nl> wrote in message news:7u8387$dh8$1_at_freyja.bart.nl...
> use the sequence generator, ask your dba for further details
> Starman heeft geschreven in bericht <7u7pse$gdo$1_at_draco.tiscalinet.it>...
> >Hello all,
> >
> >i need to have a one-to-one relation between two tables of a form without
> >having a real unique-key.
> >So i need to create a counter field (hidden to user).
> >If i want to use a ROWID type field, how can i manage it? There is a
ROWID
> >property for oracle tables but i can't get its value in Form Designer for
> >assigning it in my counter field.
> >How can i do?
> >Thanx
> >--
> >Nino Stella
> >email: ninomail_at_tin.it
Received on Sat Oct 16 1999 - 15:46:36 CEST

Original text of this message