home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / database / oracle / 1508 < prev    next >
Encoding:
Text File  |  1992-09-07  |  2.4 KB  |  56 lines

  1. Newsgroups: comp.databases.oracle
  2. Path: sparky!uunet!rde!andy
  3. From: andy@homebase.vistachrome.com (Andy Finkenstadt)
  4. Subject: Re: How to print something in PL/SQL
  5. Message-ID: <1992Sep5.005031.21099@homebase.vistachrome.com>
  6. Reply-To: andy@homebase.vistachrome.com
  7. Organization: Vista-Chrome Incorporated
  8. References: <shamel.715612348@tdsb-s>
  9. Date: Sat, 5 Sep 1992 00:50:31 GMT
  10. Lines: 44
  11.  
  12. shamel@mais.hydro.qc.ca (Stephane Hamel) writes:
  13. >When you use PL/SQL in SQL*Forms, you can show messages using the SQL*Forms
  14. >MESSAGE() function.
  15.  
  16. This is because the PL/SQL engine runs INSIDE of SQL*forms 3.0, not on the
  17. database except when it has to access a database-inherent function such as
  18. a sequence, table, view, pseudocolumn (sysdate), and so on.
  19.  
  20. Because it runs WITHIN SQL*forms it has access to your keyboard and screen,
  21. just like Forms does.  Additionally, forms adds a bunch of packages to the
  22. PL/SQL language (for example, MESSAGE() :-) ) which actually end up calling
  23. a SQL*Forms routine.
  24.  
  25. >I have built an SQL*Plus script, wich use in-line PL/SQL. My problem is that
  26. >there is no way to print a message on the screen when you are inside the
  27. >PL/SQL block! 
  28.  
  29. Right.  When you are in SQL*Plus, the PL/SQL is running on the DATABASE
  30. engine, not within SQL*plus.  The "Database engine" has no access to your
  31. screen at all, nor are these predefined packages available to it.
  32.  
  33. >              I wonder if someone have a solution for this. I can't understand
  34. >why there is no ECHO, PRINT, TYPE, REMARK, COMMAND, MESSAGE or any such command
  35. >that simply print-out a text string!
  36.  
  37. The solution, which only works if you can execute a standard.COMMIT statement,
  38. is to insert trace and other information in a table which you can view
  39. after the fact.  This doesn't work if you need to ROLLBACK any of your work,
  40. since the trace info ends up rolled back, too. :(
  41.  
  42. >--
  43. > Stephane Hamel (SHamel@Mais.Hydro.Qc.Ca)
  44.  
  45. Hope that helps a little.  One of the things that CAN work is to
  46. use "SELECT 'I got to point3' INTO :variable FROM DUAL" within a Pro*C
  47. embedded PL/SQL block, you can use as many variables as you want to know
  48. how things are going.
  49.  
  50. -- 
  51. Andrew Finkenstadt       | Vista-Chrome, Inc.   |           andy@GEnie
  52. GEnie Unix Sysop/Manager | The Printing House   |    NIC Handle: AF136
  53. +1 904 222 2639 home     | 1600 Capital Cir SW  |   ...!uunet!rde!andy
  54. +1 904 575 0189 work     | Tallahassee FL 32310 | andy@vistachrome.com
  55. --------->  "Our OS which art in CPU... UNIX be thy name"  <----------
  56.