开发者

Where and AutoGenerateWhere in EntityDataSource

I keep getting this error and I think it's a Bug but I would like your opinions.

WhereParameters cannot be specified unless AutoGenerateWhere==true or Where is specified.

this is my entitydatasource control.

<asp:EntityDataSource ID="MtrlEntityDataSource" runat="server" 
    ConnectionString="name=AitisiEntities" DefaultContainerName="AitisiEntities" 
    EnableDelete="True" EnableFlattening="False" EnableInsert="True" Select="" AutoGenerateWhereClause="false"
    EnableUpdate="True" EntitySetName="MTRL" Where="it.SODTYPE = @sodTypeParam">
    <WhereParameters>
        <asp:Parameter DbType="Int32" DefaultValue="51" Name="@sodTypeParam" />
    </WhereParameters>
</asp:EntityDataSource>

Now do you see something wrong here? Tried in some projects开发者_C百科 and always keep failing.

Thank you.


Problem was so typical...long time to use parameters...

Name="@sodTypeParam" 

should be...

Name="sodTypeParam" 

For anyone looking for something similar and his mind is full....

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜