Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Sequence for generating IDs

Re: Oracle Sequence for generating IDs

From: Keith Gilbert <peggyandkeith_at_worldnet.att.net>
Date: 16 Jan 1999 05:06:09 GMT
Message-ID: <77p6o1$50h@bgtnsc03.worldnet.att.net>


You might try setting up a package with variables that store the last id set by a trigger associated with a particular table.

ie:

CREATE OR REPLACE PACKAGE SEQUENCES AS CLIENT_ID CLIENT.ID%TYPE;
INVENTORY_ID INVENTORY.ID%TYPE; END; Then have your triggers for each associated table set these package variables which you can then retrieve from your client app.

Keith Gilbert

Paul wrote in message <369e7041.7901288_at_news.dial.pipex.com>...
>I am using sequences to generate primary keys for tables. If I use
>triggers to generate the next ID in the sequence automatically what is
>the best way to find out what ID was generated in Visual Basic. Any
>help is appreciated.
>
>Paul
Received on Fri Jan 15 1999 - 23:06:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US