Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: DBMS_OUTPUT and ODBC

Re: DBMS_OUTPUT and ODBC

From: Miles Thomas <See_sig_for__at_ddress.com>
Date: 1997/02/10
Message-ID: <5dn7hm$on1@romeo.logica.co.uk>#1/1

In article <5dg5ig$6cc_at_chaos.dac.neu.edu>,

   jglickma_at_lynx.dac.neu.edu (jon glickman) wrote:
>Does anybody have any experience in how to get around the
>DBMS_OUTPUT.PUTLINE( ... ) function from a stored procedure
>or a cursor in a ODBC call. In sqldba or sql*plus one would
>first
>
>sql> set server output on
>sql>
>
>how does one do the same in a ODBC call to the database,
>my curses and stored procedures work but I can't get them
>to display anything from the DBMS_OUTPUT statement?
>
> jglickma_at_lynx.neu.edu

DBMS_OUTPUT works by storing all the lines in an internal buffer (an array in the DBMS_OUTPUT package). The 'client' code (eg SQLDBA, SQLPLUS) has to call another procedure from the DBMS_OUTPUT package (GETLINE?), which takes data out of the array. The client is responsible for printing the data.

I can't remember whether ODBC allows you to call procedures with out parameters. You could try Oracle Objects for OLE (Oracles version of RDO, which I think does allow you to call such procedures), or create another package which calls getline and puts the data into a database table which you can then read. NB all calls to GETLINE must be in the same connected session as the calls to PUTLINE; PL/SQL package arrays are persistent within the same session only, as I recall.

Miles Thomas
Logica UK Ltd
thomasm_at_logica.com
The above are personal opinions, and are not necessarily the opinions of my employer. Received on Mon Feb 10 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US