Page 1 of 1

Index out of range?!?!

Posted: Tue 14 May 2013 19:42
by HSNMatt
Hello,

I have a stored procedure which I had to custom map back into entity designer because it can't be called using nulls. It'll return an invalid cursor.

I've created my method to call the stored procedure, created the complex type, and mapped the columns from the database to the parameter names in the complex type. When I go to run the stored procedure, I get the following message:

Code: Select all

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
I'm not sure, but could this have to do with the cursor from the DB having more columns than the complex type has? I'm doing this on purpose, but I can just pull in the added columns if I need to.

Thanks!

Re: Index out of range?!?!

Posted: Wed 15 May 2013 15:33
by HSNMatt
Followup to the previous post:

I added the remaining column into the complex type and mapped them, and it eliminated the error.

Re: Index out of range?!?!

Posted: Mon 20 May 2013 08:01
by Shalex
The complex type should have the same set of columns as the corresponding cursor.