Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting dates in a Web form
Message
From
29/05/2007 17:33:17
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01229139
Message ID:
01229172
Views:
26
Gerard,
Use parameters.
Cetin

>Hi Kevin.
>Tried that and it works..up to a point.
>I have got the Session varaibales stored as date fields now ok int the Called form, but cannot get the select to work:
>Keep getting a :-
>Conversion failed when converting datetime from character string
>
>x="Select * from MyTable where MyDate" + " >= " + ?????? ldDate
>I am unsure what syntax to use with the date
>Do I need to convert the ldDate to a string ?
>
>
>regards,
>Gerard
>
>
>
>
>>Hi, Gerard,
>>
>>You should be able to store datetime values in Session Variables.
>>
>>
>>DateTime dtToday = DateTime.Today;
>>Session["SessDate"] = dtToday;
>>
>>DateTime dt2 = (DateTime)Session["SessDate"];
>>
>>
>>I'd recommend passing them as parameters to a data access layer.
>>
>>Hope that helps...
>>Kevin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform