开发者

Where and AutoGenerateWhere in EntityDataSource

开发者 https://www.devze.com 2023-02-07 11:40 出处:网络
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.

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

精彩评论

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