Passing ArrayList to Oracle Stored Procedure

Posted by Amniss under VB.NET on 6/22/2010 | Views : 9113 | Status : [Member] | Replies : 1
Hi Team,
This is Shahbaz , writing my first post :)

I am struggling with some issue in VB.Net, the requirement is to pass the parameter as an Arraylist to Oracle Stored Procedure, Pleae find my code below, am getting error, dont know what am missing, if anyone has idea /has worked on it. Please guide me, your help will be greatly appreciated.

Dim oracleparam As OracleParameter = cmdCommand.Parameters.Add("P_IDS", OracleDbType.Decimal, ParameterDirection.Input)
'let's make it a PSQLAssociative Array
oracleparam.Value = mArrBuildingList
oracleparam.CollectionType = OracleCollectionType.PLSQLAssociativeArray
cmdCommand.ArrayBindCount = mArrBuildingList.Count
Conn = New OracleConnection
Conn.ConnectionString = ConnStr
Conn.Open()
cmdCommand.Connection = Conn
cmdCommand.CommandText = "CRSTOOLS.CMT_PKG_APPLICATION.SP_Array_Test"
cmdCommand.CommandType = CommandType.StoredProcedure
cmdCommand.ExecuteNonQuery()

error is , OracleParameter is InValid

Thanks and Regards,
Shahbaz

Thanks and Regards,
Shahbaz



Responses

Posted by: Vuyiswamb on: 6/22/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
I have never worked with Oracle Db , but here are some links that can shed the light
http://www.dbforums.com/ansi-sql/862064-how-pass-array-strings-stored-procedure-oracle.html
http://www.oracle.com/technology/oramag/oracle/07-jan/o17odp.html

Thank you for posting at Dotnetfunda
[Administrator]

Amniss, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response