Home » RDBMS Server » Networking and Gateways » DBMS_HS_PASSTHROUGH.BIND_OUT_VARIABLE
DBMS_HS_PASSTHROUGH.BIND_OUT_VARIABLE [message #401380] Mon, 04 May 2009 06:57
gusami
Messages: 1
Registered: July 2007
Junior Member
I use oracle odbc gateway for database supporting odbc.
I try to bind output variable, but some error message returned.
Here is error message from Oracle and source code.
Odbc trace log did't leave any error message.
If I create p_tax without output parameter and do not use BIND_OUT_VARIABLE procedure, error is not occured.

What is the problems?
OS: Linux zubuntu 2.6.20-17-generic #2 SMP Wed Aug 20 16:47:34 UTC 2008 i686 GNU/Linux
ORACLE version: SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 4 20:57:34 2009

SQL> select p_tax(2) from dual;
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Generic Connectivity Using ODBC][A030] The parameter with ordinal 0 does not
exist.
ORA-06512: at "GUSAMI.P_TAX", line 14

create or replace function p_tax
(v_num in number)
return number
is
c INTEGER;
nr INTEGER;
v_tax number;
begin
c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@tblink;

DBMS_HS_PASSTHROUGH.PARSE@tblink(c, 'begin p_tax(?, ?); end;');
DBMS_HS_PASSTHROUGH.BIND_VARIABLE@tblink(c, 1, v_num);
DBMS_HS_PASSTHROUGH.BIND_OUT_VARIABLE@tblink(c, 2, v_tax, null);

nr := DBMS_HS_PASSTHROUGH.EXECUTE_NON_QUERY@tblink(c);

DBMS_HS_PASSTHROUGH.GET_VALUE@tblink(c, 2, v_tax);
DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@tblink(c);
return v_tax;
end;
/
Previous Topic: Error Message in trying to create a listener
Next Topic: Cannot start listener due to missing library
Goto Forum:
  


Current Time: Tue Mar 19 04:55:26 CDT 2024