Error while using SP with Parameters.

Sep 30, 2010 at 8:55 AM

Dear bykinag there is an issue here, when I used simple Stored Procedure(SP) through Entity Framework  the control was working but when I checked it with a prameterized SP it started giving an error , can try it at ur end and check for the solution



Ahmed Kapasi

Sep 30, 2010 at 9:34 AM

Hi ahmed,

if you using query with params control not working properly, because control do not know what parameters is needed for Invoke this query.

Sep 30, 2010 at 10:01 AM

Thanks bykinag for the reply , but I think it is an important feature which you should think of implementing in this control



Ahmed Kapasi

Sep 30, 2010 at 10:14 AM

at the current time i do not think it is possible, because i do not know how to do that.

look at the source and you'll understand what I mean:

Utilities =>GetListOfDomainEntityFields=> go to line below

EntityQuery query = (EntityQuery)operationInfo.Invoke(dds.DomainContext, null);
Sep 30, 2010 at 12:08 PM

i found "Non-Public member" with name "_entityType" in the DomainDataSource, that can help me to reorganize code,

but i not have idea how to get this member with reflection.

any ideas?


Oct 1, 2010 at 9:12 AM

Dear bykinag,

                                    The problem is that This feature was working fine in earlier version of this control but after I have implemented the latest code it stopped working and giving an error of argument mismatch. can check  u check it pls, as it has become a show stopper now .



Ahmed Kapasi

Oct 1, 2010 at 9:34 AM

Ahmed, recently in the control changes were made that dramatically changed the principle of obtaining EntityFields, so now I do not know how to resolve the situation.

if you are ready and can help with the above I described a situation in which need help.

Oct 1, 2010 at 12:19 PM

Hi bykinag

Dude I am no match if compared to your coding standard and innovation, and if u find it difficult than it is impossible for me ;)  and so I guess are only person

  who can resolve this issue as without it we cannot proceed.



Ahmed Kapasi

Oct 1, 2010 at 12:56 PM

operationInfo.Invoke(dds.DomainContext, null




giving error, and found that this overlaoded method have other parameters where we can add an array of object , I think

we create parameter array and pass it. what do u say.

Ahmed Kapasi


Oct 1, 2010 at 1:08 PM


call the method with the substitution of parameters - this is not the way out.
since the methods may have different input parameters, up to a data structure, and then what to do?

so I think this approach is a dead end, we need another approach is more loyal.

Oct 1, 2010 at 1:27 PM

u r right it may have differnet parameters and so I the programmer will give the parameter through Public Property of this control ex - Filtercontrol.SPparamters in a comma separated string like "city,State,Country"

we hae to split this property to convert it to array befor we call the invoke method, I hope  u understand what I am thinking


Ahmed Kapasi

Oct 1, 2010 at 1:32 PM

Ahmed, the proposed version of you - еthe dead end.
we need a different approach, where everything is done without much programmer intervention.

Oct 1, 2010 at 4:23 PM


                   You can use the dds.QueryParameters property which returns the paramtercollection object and details which we need, I think it will work for us.



Ahmed Kapasi


Oct 1, 2010 at 5:45 PM

Ahmed, you do not think back to front.

what if no parameters and they are filled later when loading the page?
what if the parameter to pass to the structure?
and all these "what if" nullify this approach.

Programming is like chess - you need to think on the front.

Before take something brother, you have to weigh the pros and cons, in this case, I am against the implementation as a bowl cons outweigh, in addition, this implementation does not free you from future problems that will appear again and again.