Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird problem
Message
 
General information
Forum:
ASP.NET
Category:
Other
Title:
Environment versions
Environment:
C# 3.0
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01327334
Message ID:
01327341
Views:
11
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
Previous
Reply
Map
View

Click here to load this message in the networking platform