home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / database / oracle / 2772 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  2.6 KB

  1. Path: sparky!uunet!hayes!fgreene
  2. From: fgreene@hayes.com
  3. Newsgroups: comp.databases.oracle
  4. Subject: Re: Help needed: Simple Forms V3 Qns.
  5. Message-ID: <6645.2b527bd0@hayes.com>
  6. Date: 12 Jan 93 08:05:35 EDT
  7. References: <1993Jan11.230248.8262@brt.deakin.edu.au>
  8. Organization: Hayes Microcomputer Products, Norcross, GA
  9. Lines: 45
  10.  
  11. In article <1993Jan11.230248.8262@brt.deakin.edu.au>, ajmex@brt.deakin.edu.au writes:
  12. > I have been away from Oracle for a couple of years, and have a few questions
  13. > relating to SQL*Forms V3 .
  14. > 1. How do you disable key triggers? In V2 you just defined them with
  15. >    text of "#EXEMACRO NULL", but I cant find an equivalent in V3 .
  16.  
  17.     just use the value NULL; 
  18. > 2. I want a screen to set off a background process that runs a SQL*Plus
  19. >    routine. How do I run this under the same User/Passwd?
  20.     From within a trigger, include the line
  21.  
  22.         HOST('sqlplus -a / @program_name') 
  23.  
  24.     to start immediate operation of a program.  To make it run as a
  25.     batch routine you need to augment it with operating specific
  26.     commands.  For example, in UNIX, you would add an '&' character
  27.     to the end of the string.  In VAX, you need to route the commands
  28.     through a .COM file, etc.
  29.  
  30. > 3. In PL/SQL, if a SQL statement returns no rows, this is interpreted as an
  31. >    error, and the exception handler is invoked. Is there no way to continue
  32. >    processing at this point? Not all cases of "No rows found" are errors, in
  33. >    my book. Not fatal errors, in any case.
  34.  
  35.     Easiest way to do it is to first retrieve a count of all candidate
  36.     records into a local variable.  If the count is greater than zero
  37.     then execute the query.  A more efficient method is to utilize a
  38.     CURSOR command combined with a loop.  If there are no records
  39.     retrieved, there will just be zero passes through the loop.  There
  40.     is a good example under the heading 'Cursor Management' in chapter
  41.     2 of the PL/SQL User Guide and Reference.
  42.  
  43.  ----------------------------------------------------------------------------
  44.  |      Frank Greene                  |          //////  //////             |
  45.  |      DELPHI SYSTEMS, Inc.          |           ////    ////              |
  46.  |      Telephone [615] 458-6032      |          ////    ////  //////       |
  47.  |      Compuserve 74200,427          |         ////    ////    ////        |
  48.  |      324 Ootsima Way               |        ////    ////    ////         |
  49.  |      Loudon, TN 37774              |       //////  //////  //////        |
  50.  ----------------------------------------------------------------------------
  51.  |         Of course, any opinions or suggestions are strictly my own       |
  52.  ----------------------------------------------------------------------------
  53.