Help with Forms and ORA-01475

From: Andy Hardy <aph_at_glink.net.hk>
Date: 16 May 1998 17:26:36 GMT
Message-ID: <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 Sat May 16 1998 - 19:26:36 CEST

Original text of this message