Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP inlist() in c#
Message
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01320903
Message ID:
01564304
Views:
41
Did you miss out some "else"'s ? Would this work:
if (endTime == defaultDate) endTime = DateTime.MaxValue;
>sqlStatement.AppendLine("salespoint = @SalesPoint AND date_time between @StartTime and @EndTime");
>sqlCommand.Parameters.Add("@StartTime", SqlDbType.DateTime).Value = startTime;
>sqlCommand.Parameters.Add("@EndTime", SqlDbType.DateTime).Value = endTime;
or will it be less efficient on the SQL side ?

I think it may be as efficient as the original, I like it - I am going to adjust my code to use this version instead.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform