Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Long raw with DynamicSQL?
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;
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