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

Home -> Community -> Usenet -> c.d.o.tools -> Here is a good one

Here is a good one

From: Jeff Boyer <jdboyer_at_(remove)icomproductions.ca>
Date: Wed, 11 Jul 2001 10:08:38 -0600
Message-ID: <9ihu7r$sm1$1@news3.cadvision.com>

Ok people, I am using Oracle 8i and for a front end I have a feedback process online using VBScript. In this feedback process I have a form that inserts all the information for the feedback into my feedback table. However ,before any of it happens I have a trigger that inserts a feedback id before anything is inserted. The insertion happens when the submit button is pressed. What happens next is where I am stuck. When you hit the submit button, you are taken to a web page that gathers a little more information regarding contact information and so forth. On this page I need to be able to update that record that was just created in the feedback table. In order to do this I need to know that feedback Id that my trigger just created for me. Is there any way at all to get that id back out of the database? I have been banging my head against a wall for a week now and can't seem to get it. Just for your information the trigger I use to insert the feedback id is below.

CREATE OR REPLACE TRIGGER Feedback_Id_trg  BEFORE INSERT on Feedback
 FOR EACH ROW
 DECLARE
  Temp varchar2(30);
 BEGIN
  SELECT Feedback_ID_SEQ.NEXTVAL
  INTO Temp FROM DUAL;
  Temp := 'FB-'||Temp;
  :New.Feedback_id := Temp;

 End;
/ Received on Wed Jul 11 2001 - 11:08:38 CDT

Original text of this message

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