home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / database / oracle / 1164 < prev    next >
Encoding:
Text File  |  1992-07-29  |  1.4 KB  |  39 lines

  1. Newsgroups: comp.databases.oracle
  2. Path: sparky!uunet!wupost!ukma!deepthought!neil
  3. From:  Neil Greene <deepthought!neil@ms.uky.edu> 
  4. Subject: Selecting sequences into form fields
  5. Message-ID: <1992Jul29.172346.7958@deepthought.uucp>
  6. Sender: neil@deepthought.uucp (Neil Greene)
  7. Reply-To:  Neil Greene <deepthought!neil@ms.uky.edu> 
  8. Organization: ARCI, Inc.
  9. Date: Wed, 29 Jul 1992 17:23:46 GMT
  10. Lines: 27
  11.  
  12. I have 3 sequences: seq_nasrisid, seq_rulingid, seq_licensid.  Each of these  
  13. sequences are displayed in a different block on a different page of the form.
  14.  
  15. I have a trigger that catches KEY-CREREC which then uses an if statement to  
  16. determine which block I am in and then fetch the next available sequence into  
  17. the form for that record.
  18.  
  19. > if (:SYSTEM.CURSOR_BLOCK = 'MASTER') then
  20. >     clear_MASTER_details(TRUE, DO_COMMIT);
  21. >     create_record;
  22. >     select SEQ_NASRISID.NEXTVAL into :MASTER.NASRISID from dual;
  23.  
  24. This works fine, however, the if statements do not work for the other two  
  25. sequences.  
  26.  
  27. > elsif (:SYSTEM.CURSOR_BLOCK = 'RULINGS') then
  28. >      create_record;
  29. >      select SEQ_RULINGID.NEXTVAL into :RULINGS.RULINGID from dual;
  30. > end if;
  31.  
  32. Could someone explain what I am doing wrong.  Table and sequence permissions  
  33. are set correctly.
  34.  
  35. -- 
  36. Neil Greene -----------    Director, Computer Information Systems ARCI, Inc.
  37. 606.254.4060 (P)    President, Kentucky NeXT User Group, Inc.
  38. 606.254.4864 (F)    Email: deepthought!neil@ms.uky.edu [NeXTmail]
  39.