-
ORA-02005 implicit (-1) length not valid for this bind or define datatype
Hi,
I have a package in oracle9i, and i am call the procedure from my vb6 application...but i am getting an error ORA -2005 implicit (-1) length not valid for this bind or define datatype. Can any check the below package and vb code to get me a solution..
CREATE OR REPLACE package NCDGNVCAMIMINTERFACE is
/* -- Public type declarations
type is ;
-- Public constant declarations
constant := ;
-- Public variable declarations
;
-- Public function and procedure declarations
function ( ) return ;*/
type identifierdata is record(
identifier varchar2(40),--identifier@uatlink.format%type,
status varchar2(40),--identifier@uatlink.state%type,
vanity varchar2(40));-- vanity_level@uatlink.name%type);
type identifierdataset is table of identifierdata index by binary_integer;
type vanitydata is record(
level_id varchar2(40),--vanity_level@uatlink.id%type,
level_name varchar2(40));-- vanity_level@uatlink.name%type);
type vanitydataset is table of vanitydata index by binary_integer;
procedure getEventType(pProduct_Id IN product.product_id%type,
pEvent_Type_Id IN eventtype.event_type_id%type,
pEvent_Type IN OUT varchar2, -- possible values 'MSISDN' or 'IMSI'
pErrorMessage IN OUT varchar2);
end NCDGNVCAMIMINTERFACE;
/
CREATE OR REPLACE package body NCDGNVCAMIMINTERFACE is
/* -- Private type declarations
type is ;
-- Private constant declarations
constant := ;
-- Private variable declarations
;*/
-- Function and procedure implementations
-- procedure to decide what screen to display
procedure getEventType(pProduct_Id IN product.product_id%type,
pEvent_Type_Id IN eventtype.event_type_id%type,
pEvent_Type IN OUT varchar2, -- possible values 'DN' or 'IMSI'
pErrorMessage IN OUT varchar2) is
begin
select NII_ID_CONFIG_UUID
into pEvent_Type
from gniproducteventtype gpet
where gpet.product_id = pProduct_Id
and gpet.event_type_id = pEvent_Type_Id;
exception
when others then
pErrorMessage := 'getEventType failed with error: ' || SqlCode ||' -> '|| Sqlerrm;
end;
end NCDGNVCAMIMINTERFACE;
/
*************VB Application code*****************
Private Sub Form_Load()
Conn = "UID=**** ;PWD=****;driver=" _
& "{Microsoft ODBC for Oracle};SERVER=develop2;"
Set Cn = New ADODB.Connection
With Cn
.ConnectionString = Conn
.CursorLocation = adUseClient
.Open
End With
QSQL = "{call ncdgnvcamiminterface.geteventtype(?,?,{resultset 2, pEvent_Type, " _
& "pErrorMessage})}"
Set CPw2 = New ADODB.Command
With CPw2
Set .ActiveConnection = Cn
.CommandText = QSQL
.CommandType = adCmdText
'.Parameters.Append .CreateParameter("pProduct_Id", adInteger, adParamInput, 9)
'.Parameters.Append .CreateParameter("pEvent_Type_Id", adInteger, adParamInput, 9)
End With
CPw2(0) = 1 'just for testing values are hardcoded
CPw2(1) = 2
Set Rs = New ADODB.Recordset
With Rs
.CursorType = adOpenStatic
.LockType = adLockReadOnly
.open
End With
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|