home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / database / oracle / 1279 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  2.5 KB

  1. Path: sparky!uunet!decwrl!oracle!unrepliable!bounce
  2. Newsgroups: comp.databases.oracle
  3. From: mclark@us.oracle.com
  4. Subject: Re: Implementing selectable LOV, how to...
  5. Message-ID: <1992Aug13.030611.1@us.oracle.com>
  6. Followup-To: comp.databases.oracle
  7. Lines: 54
  8. Sender: usenet@oracle.us.oracle.com (Oracle News Poster)
  9. Nntp-Posting-Host: devvms.us.oracle.com
  10. Organization: Oracle Corporation, USA
  11. References: <1992Aug4.164432.12930@unixg.ubc.ca>
  12. Date: Thu, 13 Aug 1992 11:06:11 GMT
  13. X-Disclaimer: This message was written by an unauthenticated user
  14.               at Oracle Corporation.  The opinions expressed are those
  15.               of the user and not necessarily those of Oracle.
  16.  
  17. In article <1992Aug4.164432.12930@unixg.ubc.ca>, george@unixg.ubc.ca (George chow) writes:
  18. > Hello,
  19. >   I'm trying to implement a LOV from which a user is allowed to pick multiple
  20. > values. I'm thinking of something similar to the <Select Columns> in 
  21. > SQL*Forms's Default Block form. Other than that is is a pop-up page, I have no
  22. > real idea of how to approach this. So has anyone here tried to do anything 
  23. > similar to this?
  24. > George
  25. Hi George,
  26. This situation normally occurs when you have the following:
  27.  
  28. Table A >---- Intersecting Table A/B ----< Table B (Pathetic attempt at E-R)
  29.  
  30. Where, say, Table B has a small number of rows, and we wish to populate Table
  31. A/B (The intersecting table with keys from A and B)
  32.  
  33. One way to do this is to Create a Block based upon A to enable the user to
  34. Query which "A" they would like to nominate the "B"'s for.
  35.  
  36. A short discussion of this technique follows:
  37.  
  38. Then Create a Block based upon "B".
  39.  
  40. Make Block "B" the Detail for Block "A" (This is why we rely on the small
  41. number of rows in "B")
  42.  
  43. Write a PRE-QUERY Trigger on BLock "B" to Highlight the Row Returned if a row
  44. exists in the intersection Table A/B.  (using DISPLAY_FIELD)
  45.  
  46. Write trigger code to stop  inserts/deletes in Block "B".
  47.  
  48. Nominate a function key to be the "Select a Row" key.
  49. Make this key change some detail in Block "B".  This will force an Update in
  50. the Block which we can use to write/remove a row from the intersecting Table
  51. "A/B".
  52. Also make the key highlioght/de-highlight the row using display_field.
  53.  
  54.    Re-Write the ON-UPDATE Processing to Insert/Delete the Row in the
  55. intersecting Table "A/B" depending upon whether the user has seleceted a new
  56. row or de-selected an existing row.
  57.  
  58.   Re-write the ON-LOCK Processing so that it does not lock table "B"
  59.  
  60.  
  61. This was written in a Rush, so give me a Mailer if you have any problems
  62. (Assumes forms 3.0)
  63.  
  64. Thanks
  65.  
  66. Mark Clark (mclark@au.oracle.com)
  67.  
  68.