Re: Help with Forms and ORA-01475

From: Andy Hardy <aph_at_glink.net.hk>
Date: 27 May 1998 15:21:06 GMT
Message-ID: <01bd8664$fa483650$0101010a_at_goldcoast1>


And the solution appears to be to use the same variable in each call of dbms_pipe.unpack_message e.g. to use

	dbms_pipe.unpack_message(v_a_varchar);
	v_hanger_id := to_number(v_a_varchar);
	dbms_pipe.unpack_message(v_another_varchar);
	v_charge_area := v_another_varchar;

instead of

> dbms_pipe.unpack_message(v_hanger_id);
> dbms_pipe.unpack_message(v_text); -- raises exception

I *guess* that there is a bind occurring on the first call to the non-Forms procedure and all subsequent calls to that procedure need to be of the same type.

Andy

Andy Hardy <aph_at_glink.net.hk> wrote in article <01bd80f0$354ee070$0101010a_at_goldcoast1>...
> Hi,
>
> I have a very simple procedure which reads from a pipe and places the
> contents on the form.
>
> Unfortunately, I'm getting an ORA-01475 (referring to the need to reparse
a
> cursor before changing the bind type) on attempting to unpack the second
> item in the pipe - the first was a number and the second is a varchar2.
>
> I don't understand why I'm getting the message and how to fix it.
>
> This is the procedure in my form.
> PROCEDURE check_for_hanger IS
> v_status NUMBER;
> v_hanger_id NUMBER;
> v_charge_area VARCHAR2(20);
> v_text VARCHAR2(80);
> BEGIN
> v_status := dbms_pipe.receive_message('hanger_pipe',0);
> IF v_status = 0 THEN
> dbms_pipe.unpack_message(v_hanger_id);
> dbms_pipe.unpack_message(v_text); -- raises exception here
> :hanger_id := v_hanger_id;
> :charge_area := v_charge_area;
> END IF;
> EXCEPTION
> WHEN OTHERS THEN
> v_text := v_text || SQLERRM(SQLCODE);
> MESSAGE(v_text);
> END;
>
> and this is the database procedure which wrote to the pipe.
>
> procedure test_pipe
> is
> v_status NUMBER;
> v_hanger_id NUMBER := 101;
> v_charge_area VARCHAR2(20) := 'bar sales';
> begin
> dbms_pipe.pack_message(v_hanger_id);
> dbms_pipe.pack_message(v_charge_area);
> v_status := dbms_pipe.send_message('hanger_pipe');
>
> if NOT v_status = 0 THEN
> dbms_output.put_line('status is '||v_status);
> end if;
> end;
>
> Ideas?
>
> Andy
>
Received on Wed May 27 1998 - 17:21:06 CEST

Original text of this message