• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 810
  • Last Modified:

Oracle Stored procedure with table of varchar2 as outparameter

I am executing a oracle stored procedure which is having output parameter of type table of varchar2. This procedure is defined inside a package.

Iam using ORAOLEDB.ORACLE provider to connect with oracle DB.

Below is the stored procedure description,

Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 V_COMMODITYTYPECD              VARCHAR2                IN
 V_PARTORIGIN                   VARCHAR2                IN
 V_VEHLINE                      VARCHAR2                IN
 V_EFFIN                        VARCHAR2                IN
 V_EFFOUT                       VARCHAR2                IN
 O_STRMODELYEAR                 TABLE OF VARCHAR2(15)   OUT


I am using the below line as command text to execute the SP,


cmdMY.CommandText = "{call SGTI_PKGETSECTIONMODELYEAR.PRGETSECTIONMODELYEAR('T','WERS','U7','31-JAN-2000','NIL',{resultset 2,O_strModelYear})}"


While executing this I am getting the error stating "O_strModelYear identifier undefined"

Could any one please help me?
0
B_SIVARAMAKRISHNAN
Asked:
B_SIVARAMAKRISHNAN
  • 3
1 Solution
 
Swadhin RaySenior Technical Engineer Commented:
>> O_STRMODELYEAR                 TABLE OF VARCHAR2(15)   OUT

Change it to O_STRMODELYEAR                 TABLE OF VARCHAR2 OUT
0
 
B_SIVARAMAKRISHNANAuthor Commented:
I cant change in DB. This works fine with the MicrosoftODBC provider.
0
 
B_SIVARAMAKRISHNANAuthor Commented:
OraOLEDB.Oracle provider does not support table of varchar type. Work around should be done.
0
 
B_SIVARAMAKRISHNANAuthor Commented:
Didnt get any other exact answer.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now