Thursday, September 3, 2009

ASP.NET Error - Wrong number or types of arguments in call to

While setting up a new GridView inside an ASP.NET webpage, I got the following error:

ORA-06550: line 1, column 7:

PLS-00306: wrong number or types of arguments in call to ”UPDATE_SCHEDULE”

ORA-06550: line 1, column 7:

PL/SQL: Statement ignored

My GridView accesses data from an Oracle 10g Express database, through an SQLDataDource (with its Provider set to OracleClient). What was happening is that the stored procedure was expecting 4 input parameters, but my gridView had 5 columns defined with the “readonly” property set to FALSE. This meant that when the update command was executed in the GridView, it would attempt to send 5 values to the stored procedure.

So the solution to this problem was simply to set the “readonly” property for all fields that do not participate in the update procedure to TRUE. Works great now.