The next form created by the form wizard will use the sequence.
If you want you can create an "on record insert" trigger which
will set the :new.column_name with the sequence.
Sanjana P. Landry (san...@Ra.MsState.Edu) wrote:
: I am new to Designer 2000 so please bear with me.
: I have created tables and have let Designer create surrogate primary keys
: and sequences. My question
: is how do I indicate that the primary key is to be populated automatically in a sequence each time the table has an insert or append.
: --
: -Sanjana Landry
--
This posting represents the personal opinions of the author. It is not the
official opinion or policy of the author's employer. Warranty expired when you
opened this article and I will not be responsible for its contents or use.
The first step of course is to create the sequence you wish to use,
the easiest way to do this is in the RON. Following that, there
are two simple ways to assign the created sequence to a table column.
The quickest way to do this is through the RON by selecting the
primary key column you wish to assign the sequence to (by first
expanding
the table node, then the node of the specific table, next expanding
the columns node, and finally selecting the primary key column itself)
and change the ORACLE SEQUENCE property to the desired sequence name (if
the sequence has already been created it will appear in a drop down list
for
the ORACLE SEQUENCE property).
The second way to do this is through the Data Diagrammer (Data Schema).
You can include the desired table in the diagram and edit the
table definition (by double-clicking on the table or using the menu
options Edit-Elements-Table). Within the Edit Table dialog box,
select the COLUMN DEFN tab. The last property for each column is
the ORACLE SEQUENCE property (which again has a drop down box of
valid sequences).
Either of these solutions will give you the desired result, but
depending
on your familiarity with either the RON or the Data Diagrammer will
help decide which way to go about it.
Hope this helps.
-Robert
***********************************************************
Robert Fernandes - LLNL AIS Dept
Phone: (510) 423-1397 Fax: (510) 423-5882
Email: rfer...@llnl.gov - or - ferna...@llnl.gov
***********************************************************
In the Data Diagrammer, bring up the table's dialog box. In the "Definition"
tab, as the last property, you should see the name of the sequence already
associated with the "Sequence" property.
(Or you can do this in RON).
san...@Ra.MsState.Edu (Sanjana P. Landry) wrote:
> I am new to Designer 2000 so please bear with me.
> I have created tables and have let Designer create surrogate primary keys
> and sequences. My question
>is how do I indicate that the primary key is to be populated automatically in a sequence each time the table has an insert or append.
-JJ
Visit our new website at http://www.jeffreyjacobs.com
Jeffrey Jacobs & Associates
Oracle Designer/2000 Consulting & Training
951-2 Old Country Road, Suite 119, Belmont, CA 94002
Voice: 650-571-1457, FAX: 800-665-1379
Email: jmja...@ix.netcom.com
Web: http://www.jeffreyjacobs.com
Don't miss the Oracle Development Tools User Group Conference in St. Louis, Nov. 2-5. See http://www.odtug.com for more information.