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