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: Long raw with DynamicSQL?

Re: Long raw with DynamicSQL?

From: <edwards_at_garland.dnr.state.sc.us>
Date: 1997/04/29
Message-ID: <336656D7.446B@garland.dnr.state.sc.us>#1/1

Markus Schöpflin wrote:

> Question:
> How can I obtain the length of the element in a select/fetch
> using dynamic SQL?

You need to use 'define_column_raw' and 'column_value_raw'. the length of the long raw element will be returned in the 'actual_length' paramater of 'column_value_raw'.

I put together a quick example, If you need more help on this, E-mail me at edwards_at_garland.dnr.state.sc.us

procedure test is
elementsize integer;
icursor integer;
iresult integer;
buffer raw(100);
column_error number(10,5);
actual_length integer;
begin

elementsize := 100;
icursor := DBMS_SQL.open_cursor;

dbms_sql.define_column_raw(icursor,1,buffer,elementsize);

iresult := dbms_sql.execute(icursor);

dbms_sql.fetch_rows(icursor);

dbms_sql.close_cursor(icursor);

exception when others then

    dbms_output.put_line(SQLERRM);
end test; Received on Tue Apr 29 1997 - 00:00:00 CDT

Original text of this message

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