<asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="< %$ ConnectionStrings:ConnectionString % >" ProviderName="< %$ ConnectionStrings:ConnectionString.ProviderName % >" SelectCommand="SELECT * FROM [publicdata] ORDER BY [lotno]"> </asp:SqlDataSource>Now, using the same toolset, I add a WHERE clause, which results in the following code:
<asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="< %$ ConnectionStrings:ConnectionString % >" ProviderName="< %$ ConnectionStrings:ConnectionString.ProviderName % >" SelectCommand="SELECT * FROM [publicdata] WHERE ([aucttype] = ?) ORDER BY [lotno]"> <SelectParameters> <asp:querystringparameter Type="String" DefaultValue="MAIL" Name="aucttype" QueryStringField="aucttype" /> </SelectParameters> </asp:SqlDataSource>I never get any data returned. The structure of the table that I am querying includes a field called aucttype of type Character, length 6.