Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Contributor
6395 Points
1182 Posts
Apr 09, 2012 10:20 AM|LINK
Place the select parameter inside the SqlDataSource and it will work:
<asp:SqlDataSource ID="MOCSetsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConString %>" SelectCommand="SELECT * FROM [mocSetsTbl] LEFT JOIN [periodTbl] ON [mocSetsTbl].[p_id] = [periodTbl].[p_id] LEFT JOIN [setsTbl] ON [mocSetsTbl].[s_id] = [setsTbl].[s_id] Where [mocSetsTbl].[p_id] = @month "> <SelectParameters> <asp:Parameter Name="month" DefaultValue="1" /> </SelectParameters> </asp:SqlDataSource>
mm10
Contributor
6395 Points
1182 Posts
Re: convert month datetime string to integer and place in select statement!
Apr 09, 2012 10:20 AM|LINK
Place the select parameter inside the SqlDataSource and it will work:
<asp:SqlDataSource ID="MOCSetsDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:ConString %>"
SelectCommand="SELECT * FROM [mocSetsTbl] LEFT JOIN [periodTbl] ON [mocSetsTbl].[p_id] = [periodTbl].[p_id] LEFT JOIN [setsTbl] ON [mocSetsTbl].[s_id] = [setsTbl].[s_id] Where [mocSetsTbl].[p_id] = @month ">
<SelectParameters>
<asp:Parameter Name="month" DefaultValue="1" />
</SelectParameters>
</asp:SqlDataSource>