Author |
Message
|
KaviKM |
Posted: Tue Dec 10, 2013 10:25 pm Post subject: Not able to pass array to oracle stored proc from WMB8 |
|
|
Novice
Joined: 10 Dec 2013 Posts: 19 Location: United Kingdom
|
Hi All,
I need to pass array to oracle stored proc in esql. I am using WMB8.
CREATE PROCEDURE CUST_UPD(IN sArray REFERENCE, IN StatusCode CHARACTER, OUT RespCode INTEGER, OUT pRespDesc CHARACTER)
LANGUAGE DATABASE EXTERNAL NAME "CUST_UPD";
There are 2 calls to this stored proc.
1:
CALL CUST_UPD(NULL, char_Stat, int_respCode, char_respDesc);
2:
CALL CUST_UPD(Environment.Variables.DATA.ID_NO[], char_Stat, int_respCode, char_respDesc);
I am not able to pass NULL value in 1st or the array in 2nd call to stored.
In 2nd call below error is received
A non scalar parameter passed to Stored Procedure
Note: The stored procedure can accept NULL values.
Any help is appreciated. |
|
Back to top |
|
 |
Esa |
Posted: Tue Dec 10, 2013 10:55 pm Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
An array is not a REFERENCE. But you probably cannot pass a reference either. It's not a scalar variable. Serialize the values into a CHAR variable?
NULL is not a REFERENCE. |
|
Back to top |
|
 |
KaviKM |
Posted: Tue Dec 10, 2013 11:14 pm Post subject: Not able to pass array to oracle stored proc from WMB8 |
|
|
Novice
Joined: 10 Dec 2013 Posts: 19 Location: United Kingdom
|
[quote="Esa"An array is not a REFERENCE. But you probably cannot pass a reference either. It's not a scalar variable. Serialize the values into a CHAR variable? ]
NULL is not a REFERENCE.[/quote]
CHAR variable but the array is of Numbers. Do we need to pass an array of CHAR values instead of INT values?
also can't we pass NULL values to stored procedure? |
|
Back to top |
|
 |
KaviKM |
Posted: Tue Dec 10, 2013 11:30 pm Post subject: Not able to pass array to oracle stored proc from WMB8 |
|
|
Novice
Joined: 10 Dec 2013 Posts: 19 Location: United Kingdom
|
What should be the declaration for the Array variable if not Reference.
I tried ROW but was not able to get the result.
CREATE PROCEDURE CUST_UPD(IN sArray REFERENCE, IN StatusCode CHARACTER, OUT RespCode INTEGER, OUT pRespDesc CHARACTER)
LANGUAGE DATABASE EXTERNAL NAME "CUST_UPD"; |
|
Back to top |
|
 |
Esa |
Posted: Wed Dec 11, 2013 12:58 am Post subject: Re: Not able to pass array to oracle stored proc from WMB8 |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
KaviKM wrote: |
What should be the declaration for the Array variable if not Reference.
|
CHAR |
|
Back to top |
|
 |
KaviKM |
Posted: Wed Dec 11, 2013 1:18 am Post subject: Not able to pass array to oracle stored proc from WMB8 |
|
|
Novice
Joined: 10 Dec 2013 Posts: 19 Location: United Kingdom
|
So the procedure should have below definition
CREATE PROCEDURE CUST_UPD(IN sArray CHARACTER, IN StatusCode CHARACTER, OUT RespCode INTEGER, OUT pRespDesc CHARACTER)
LANGUAGE DATABASE EXTERNAL NAME "CUST_UPD";
The Call to the stored proc will be as below?
CALL CUST_UPD(Environment.Variables.DATA.ID_NO[], char_Stat, int_respCode, char_respDesc);
I didn't get below part though.
"Serialize the values into a CHAR variable" |
|
Back to top |
|
 |
KaviKM |
Posted: Thu Dec 12, 2013 2:02 am Post subject: Not able to pass array to oracle stored proc from WMB8 |
|
|
Novice
Joined: 10 Dec 2013 Posts: 19 Location: United Kingdom
|
Hi
I will utilize Java since WMB 8 does not support this type of call to oracle stored proc.
Thanks for your help. |
|
Back to top |
|
 |
|