Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP inlist() in c#
Message
 
 
À
27/01/2013 04:40:59
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01320903
Message ID:
01564304
Vues:
42
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform