Re: Redirecting output to stdoutusing Pro*C and SQL PL/SQL

From: Scott Urman <surman_at_oracle.com>
Date: 1996/02/17
Message-ID: <4g5eos$ag6_at_inet-nntp-gw-1.us.oracle.com>#1/1


In article <4fvo48$qnd_at_orphan.emich.edu>, surfer_at_I_should_put_my_domain_in_etc_NNTP_INEWS_DOMAIN (Alex Sharifi) writes:
|> I currently use embedded SQL in my C code to access the database,
|> rerieve data using cursors, and then take the fetched data and store
|> it in a C struct to be processed and displayed.
|>
|> I would like to know if there's a way to have a stored procedure
|> display data to stdout, rather than using printf's in my code.
|>
|> Ex: I have a list of gizmos that I select into a cursor, and
|> then I display the cursor contents using printfs etc....
|> What I want is a "PRINT" command in SQL or PL/SQL which would
|> print output to stdout, and not have to use host variables to
|> get data and print them out in my C code.
|>
|> If anyone has any ideas I would appreciate them....Thank you...Alex Sharifi
Sorry, I don't think that is really possible, at least not with Pro*C. There is a DBMS_OUTPUT.PUT_LINE procedure in PL/SQL, which will echo only when you are using SQL*Plus or SQL*DBA. With Pro*C, printfs are the way to go. Received on Sat Feb 17 1996 - 00:00:00 CET

Original text of this message