469,625 Members | 1,253 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

DateTime.Min/MaxValue as SQL data source default parameter value?

When I try to use the following:

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:csToolbar %>"
SelectCommand="spGetValuesForDateRange" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DefaultValue="<%= DateTime.MinValue %>"
Name="FIRSTDAY" Type="DateTime" />
<asp:Parameter DefaultValue="<%= DateTime.MaxValue %>"
Name="LASTDAY" Type="DateTime" />
</SelectParameters>
</asp:SqlDataSource>

....I get an error implying that DateTime.M[in]|[ax]Value is invalid--ASP.NET
seems to think I'm trying to use strings. I can't figure out the proper
syntax.
Sep 4 '07 #1
0 1619

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Pet Matrix. | last post: by
8 posts views Thread by Manish Jain | last post: by
2 posts views Thread by - Steve - | last post: by
8 posts views Thread by craigkenisston | last post: by
14 posts views Thread by Bob Day | last post: by
4 posts views Thread by =?Utf-8?B?QmFidU1hbg==?= | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.