Thanks - so it looks like there are 10 parameters for the stored procedure.
My next question is - have you checked that the code that is calling the stored procedure is only passing in 10 parameters(no more no less) and that the parameter names are exactly as they are in the stored procedure?
“That which can be asserted without evidence, can be dismissed without evidence.”
well, I have 10 parameters and I am passing 10 parameters. Without names being correct in SP it wont insert data into table. But it is inserting the data in to table and still going to exception in catch block and throws an exception saying overload.
Your help is much appreciated.
DB2 != SQL Server
DB2 doesn't use @ as a parameter marker, it uses ? as a positional marker or : for named markers.
But this isn't a prepared statement so just try to remove all @
Disclaimer, I'm not working with DB2 either.
Should note that the error message you're getting is not from DB2 but from VB.Net, stating that there is a mismatch in the parameters. Or rather that it can't find an overload of the procedure having the right parameters.
The reason it works is that it tries to apply the parameters in the order they've been added like as if you had used ? as a marker. Like this:
Dim cm AsNew iDB2Command("CALL DEVSUSH.SP_CUSTINFO(?,?,?,?,?,?,?,?,?,?)", Cn)