home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!hayes!fgreene
- From: fgreene@hayes.com
- Newsgroups: comp.databases.oracle
- Subject: Re: PL/SQL and FORMS30 questions
- Message-ID: <6635.2b4d363a@hayes.com>
- Date: 8 Jan 93 08:07:22 EDT
- References: <1ii7jjINNoi3@terminator.rs.itd.umich.edu>
- Distribution: world
- Organization: Hayes Microcomputer Products, Norcross, GA
- Lines: 48
-
- In article <1ii7jjINNoi3@terminator.rs.itd.umich.edu>, pha@citi.umich.edu (Paul H. Anderson) writes:
- > Howdy,
- >
- > I have several problems with sqlforms30 that are really hanging me up:
- >
- > 1) setting the date in a displayed, but non-enterable field.
- >
- > I have a pre-record trigger that is attempting to automatically
- > store the date of entry into a base table field. If I convert the
- > date, and store it in some other enterable field (e.g. a character
- > comment field), etc, it shows up. (hence the trigger is working like I want).
- > Likewise, if I set the field to be enterable, I can have it's value
- > appear there (override any default value).
- > However, when I do the fairly obvious, which is to set a displayed,
- > but non-enterable date field equal to sysdate, nothing shows up.
- > How can I do this?
-
- Try using a PRE-INSERT / PRE-UPDATE trigger (one or both, depending
- on your circumstances) to set the field to SYSDATE.
- >
- > 2) getting a unique sequence number into a pl/sql local variable.
- >
- > I need to use a trigger to call a host program with a unique
- > number. To do this, I need to get the unique number into a
- > local pl/sql variable. I can use insert into <record> values (seq.nextval)
- > to put it into the record, but I don't know how to get the record
- > back out (since there are multiple forms users). Apparently, the
- > implementation context of the sequence makes it difficult for a
- > trigger to get the value. Any clues?
-
- You are apparently inserting the sequence numberdirectly into the
- data table. Try creating it to a field in the form and then
- commiting / updating the record. In this fashion, you will still
- have a copy of the number after the record is committed.
-
- If you are moving across forms, store the sequence in a global
- variable and then retrieve it a s needed.
-
- ----------------------------------------------------------------------------
- | Frank Greene | ////// ////// |
- | DELPHI SYSTEMS, Inc. | //// //// |
- | Telephone [615] 458-6032 | //// //// ////// |
- | Compuserve 74200,427 | //// //// //// |
- | 324 Ootsima Way | //// //// //// |
- | Loudon, TN 37774 | ////// ////// ////// |
- ----------------------------------------------------------------------------
- | Of course, any opinions or suggestions are strictly my own |
- ----------------------------------------------------------------------------
-