Can anybody help me with this error that I am getting on VB.net: Any responses will be very helpful
ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'GETCURRENCYFROMSCENARIO' ORA-06550: line 1, column
7: PL/SQL: Statement ignored
The Function written in VB.net that is calling the PLSQL function is pasted below:
Public Function GetCurrencyFromScenario(ByVal DataSetType As String, ByVal DataSetName As String, ByVal CurrType As String)
Dim returnValue As String
Dim db As OracleDbHelper = GetHelper()
Dim params As New List(Of OracleParameter)
params.Add(OracleParameterFactory.CreateIn("asUserName", OracleDbType.Varchar2, _props.CurrentUser))
params.Add(OracleParameterFactory.CreateIn("asDatasetName", OracleDbType.Varchar2, DataSetName))
params.Add(OracleParameterFactory.CreateIn("asDatasetType", OracleDbType.Varchar2, DataSetType))
params.Add(OracleParameterFactory.CreateIn("asCurrType", OracleDbType.Varchar2, CurrType))
Looking at your original post again, I am wondering if this might be an issue due to BindByName actually being set to true. I say that because all of the parameters are declared as varchar2 in both the PL/SQL and .NET code.
I'm not sure how much of the code in the stack you have the ability to inspect, you would just check the BindByName property value on the OracleCommand object being used to execute your command.
Alternatively you might just change the names of the parameters to match those in the PL/SQL code:
I was able to tweak my code little bit and use the exec_sql command to execute the procedure. Also, I set one of the input parameters to output parameters and hence get the value returned in through that.
I am still finding a way to check the BindByName property value and I dont have that level of access to the stack as you said. But will update you when I am successful.