Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: sqldatasource not running query
07-08-2010, 10:17 AM #1
- Join Date
- May 2010
- Thanked 0 Times in 0 Posts
sqldatasource not running queryCode:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"ConnectionString="<%$ ConnectionStrings:ABCConnectionString %>" SelectCommand="SELECT * FROM [Data] WHERE ([ActivityName] IN (@ActivityName)) AND ([ID] = @ID)" > <SelectParameters> <asp:ControlParameter ControlID="DropDownList_ID" Name="ID" PropertyName="SelectedValue" Type="Int32" /> <asp:ControlParameter ControlID="LabelHidden" Name="ActivityName" Type="String" /> </SelectParameters> </asp:SqlDataSource>
Manually, the sql query would run like this, for example:
SELECT * FROM [Data] WHERE ([ActivityName] IN ('PT Support', 'Tools Development')) AND ([ID] = 4)
It runs correctly when I use this query in SQL Management Studio, but will not run correctly from within my
Have you any advice or alternative suggestions?
I also tried with an event handler and OnSelecting, but got the same blank result.