Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DateTime.Min/MaxValue as SQL data source default parameter value?

Reply
Thread Tools

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

 
 
Homer J. Simpson
Guest
Posts: n/a
 
      09-04-2007
When I try to use the following:

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:csToolbar %>"
SelectCommand="spGetValuesForDateRange" SelectCommandType="StoredProcedure">
<SelectParameters>
<asparameter DefaultValue="<%= DateTime.MinValue %>"
Name="FIRSTDAY" Type="DateTime" />
<asparameter 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using declaration inside first template parameter as default valuefor second template parameter. Stuart Redmann C++ 5 12-14-2007 08:42 AM
Object data source, setting parameter source to Page.Partner.Guid Allan Ebdrup ASP .Net Web Controls 2 10-06-2006 10:24 AM
Data Recovery SOURCE CODE ( SOURCE CODES of Professional Data Recovery Software ) Author Tarun Tyagi C Programming 0 12-29-2004 05:10 PM
Data Recovery SOURCE CODE ( SOURCE CODES of Professional Data Recovery Software ) Author Tarun Tyagi Cisco 0 12-29-2004 05:03 PM
Tools to extract data from SQL database and convert it into XML & insert XML data into SQL databases Harry Zoroc XML 1 07-12-2004 10:10 PM



Advertisments