B
Bruno Alexandre
Hi guys...
I have this
<asp:SqlDataSource ID="dsProdutos2" runat="server"
SelectCommand="SELECT * FROM [stoProducts]"
FilterExpression="idProduct='@idProduct'"
ConnectionString="<%$ ConnectionStringsBConn %>" >
<FilterParameters>
<asp:ControlParameter Name="idProduct" ControlID="MasterGrid"
PropertyName="SelectedValue" Type="Int16" />
</FilterParameters>
</asp:SqlDataSource>
And I get this Error:
System.Data.EvaluateException: Is not possible to execute the operation '='
in System.Decimal and System.String.
i have DataKeyNames="idProduct" and the ShowSelectButton="True" in the
MasterGrid gridview control
but in the Database is an integer with AutoIncrement...
How can I manage this, why is saying that it's a string? How can I cast it
to integer?
I already tried to change FilterExpression=" idProduct = '@idProduct' " to
FilterExpression=" idProduct = @idProduct "
but then I get an error that it couldnt find the column idProduct
--
Thank you in Advance.
Bruno Alexandre
(a Portuguese in Denmark)
I have this
<asp:SqlDataSource ID="dsProdutos2" runat="server"
SelectCommand="SELECT * FROM [stoProducts]"
FilterExpression="idProduct='@idProduct'"
ConnectionString="<%$ ConnectionStringsBConn %>" >
<FilterParameters>
<asp:ControlParameter Name="idProduct" ControlID="MasterGrid"
PropertyName="SelectedValue" Type="Int16" />
</FilterParameters>
</asp:SqlDataSource>
And I get this Error:
System.Data.EvaluateException: Is not possible to execute the operation '='
in System.Decimal and System.String.
i have DataKeyNames="idProduct" and the ShowSelectButton="True" in the
MasterGrid gridview control
but in the Database is an integer with AutoIncrement...
How can I manage this, why is saying that it's a string? How can I cast it
to integer?
I already tried to change FilterExpression=" idProduct = '@idProduct' " to
FilterExpression=" idProduct = @idProduct "
but then I get an error that it couldnt find the column idProduct
--
Thank you in Advance.
Bruno Alexandre
(a Portuguese in Denmark)