I solved this problem after a bit of googling. All what needed to do was to add a Type (or Size) to my parameter.
Wow, such a simple thing took so long.
>Hi everybody,
>
>I've added one more parameter to my SQLDataSource (I'm using stored procedure). This new parameter is output parameter.
>
>I'm getting this strange error
>
>System.InvalidOperationException: String[0]:
>the Size property has an invalid size of 0. at
>System.Data.SqlClient.SqlParameter.Validate(Int32 index, Boolean isCommandProc) at System.Data.SqlClient.SqlCommand.
>SetUpRPCParameters(_SqlRPC rpc, Int32 startCount, Boolean inSchema, SqlParameterCollection parameters)
>
>
>Nothing is sent to SQL Server ('m checking this info in the SQL Profiler).
>
>Do you know what could be wrong?
>
>Here is the definition in the Page:
>
>
><InsertParameters>
> <asp:Parameter Name ="NewPersonID" Direction ="Output" />
> <asp:Parameter Name="Title" />
>Do you see what could be wrong?
>
>Thanks in advance.
If it's not broken, fix it until it is.
My Blog