Oracle, stored proc,(...) *RESOLVED*
I created a package in oracle as such:
Code:
create or replace package tt.MyPack is
-- Public type declarations
type CCLRows is REF CURSOR RETURN CREDIT_CARD_LOG%ROWTYPE;
-- Public function and procedure declarations
procedure GetCCLRows(l_user_id in CREDIT_CARD_LOG.USER_ID%TYPE, CCLGroup in OUT CCLRows);
end MyPack;
and my package body...
Code:
create or replace package body MyPack as
procedure GetCCLRows(l_user_id in CREDIT_CARD_LOG.USER_ID%TYPE, CCLGroup in OUT CCLRows) IS
begin
open CCLGroup for
select * from CREDIT_CARD_LOG
where USER_ID = l_user_id;
end GetCCLRows;
end MyPack;
So far so good?
So I want to call this stored proc from VB..this is how far I got..
VB Code:
Dim oConn As Connection
Dim oComm As Command
Dim oNewParam As Parameter
Dim oRS As Recordset
' open my connection
' ...
' ommited for brevity
Set oComm = New Command
Set oComm.ActiveConnection = oConn
' create my first parameter, correctly? the field is defined as VarChar2(35)...
Set oNewParam = oComm.CreateParameter("l_user_id", adVarChar, adParamInput, 35, "jchester1")
oComm.Parameters.Append oNewParam
Set oNewParam = Nothing
' Create my second param?...not sure if this is right...
Set oNewParam = oComm.CreateParameter("CCLGroup", adUserDefined, adParamReturnValue)
oComm.Parameters.Append oNewParam
With oComm
.CommandText = "GetCCLRows"
.CommandType = adCmdStoredProc
Set oRS = .Execute ' <- raises error "Invalid Type Name"
End With
' do my stuff
' ...
' close my db
' ...
' blah blah blah
And I get an "Invalid Type Name" error when I execute...
I'm sure I'm doing something wrong since I'm pretty new to all this..can anyone help me out?:confused:
Thanks
*RESOLVED*
Ok so I figured it out a grand total of 23 seconds after I submitted the post :rolleyes:
I just had to get rid of the second parameter in my vb code..
and change my CommandText to the full user.package.procedure path name