Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: DBMS_SQL.COLUMN_VALUE - Scratch this query.
I found the answer, it was an Oracle bug. An upgrade to procedure
builder sorts it out....
Bruce.
afriKan wrote:
>
> Hi,
>
> Even on the most basic of examples, I continuously get a type mismatch on
> the DBMS_SQL.COLUMN_VALUE procedure. I will be the first to admit that my
> documentation is not up to scratch, and may well have a stupid syntax error
> in one of the DBMS_SQL function or procedure calls.
>
> Any suggestions, here is a "dumbed down" procedure that causes the error.
>
> procedure tst is
>
> l_cursorid integer;
> l_fetch integer;
> l_dummy integer;
>
> l_user varchar2(30);
> l_select_clause varchar2(100);
>
> begin
>
> l_cursorid := DBMS_SQL.OPEN_CURSOR;
> l_select_clause := 'select user from dual';
>
> DBMS_SQL.PARSE(l_cursorid, l_select_clause, 2);
>
> DBMS_SQL.DEFINE_COLUMN(l_cursorid, 1, l_user, 30);
>
> l_dummy := DBMS_SQL.EXECUTE(l_cursorid);
>
> loop
>
> l_fetch := DBMS_SQL.FETCH_ROWS(l_cursorid);
>
> if l_fetch = 0 then
> exit;
> end if;
>
> DBMS_SQL.COLUMN_VALUE(l_cursorid, 1, l_user);
>
> text_io.put_line(l_user);
>
> end loop;
>
> DBMS_SQL.CLOSE_CURSOR(l_cursorid);
>
> exception
>
> when others then text_io.put_line('1'||to_char(sqlcode));
>
> end;
>
> -----------------------------------------------------------
>
> Thanks all
>
> --
> Bruce
>
> -----------------------
> Email: Swap co and za
--
Bruce
![]() |
![]() |