Reputation: 81
I have a problem. I'm trying this SqlCommand to get the fields from a Database with 2 conditions :
SqlDataSource1.SelectCommand = "SELECT * FROM Article where Domain like '%Geography%' order by Title";
SqlDataSource1.DataBind();
ListView1.DataBind();
or like :
SqlDataSource1.SelectCommand = "SELECT * FROM Article where Domain ='Geography' order by Title";
SqlDataSource1.DataBind();
ListView1.DataBind();
but the result is I get everything from the Article table meaningless of the Domain name.
My data source is defined as
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="
<%$ ConnectionStrings:WikipediaDatabaseConnectionString %>"
SelectCommand="SELECT * FROM [Article] ORDER BY [Title]"></asp:SqlDataSource>
Upvotes: 0
Views: 158
Reputation: 969
If you're running both of those queries, which are as simple as you can make a query and the results are not what you expect, there are only a small number of possibilities:
I really don't see how it could be anything but one of these.
Upvotes: 1