Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Building a WhereClause with Date parameters.
Message
De
22/03/2007 13:35:11
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
 
Information générale
Forum:
ASP.NET
Catégorie:
Web Services
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01207183
Message ID:
01207221
Vues:
23
Paul on the web service just have the parameters has Date, in vfp pass a date or datetime to the webservice, now when building your where clause use parameters instead of trying to put the dates in the sql string.
And you will be fine.
you should always use Parameters instead of trying to stuff into the sql string values you receive as parameters, parameters will help you to prevent sql injection attacks into your app.

>I must be a complete moron.
>
>I have been struggling with this for some time now. I have webservice where I would like to accept a daterange and then build a whereclause to search some tables and return data.
>
>This webservice is going to be called from a VFP application.
>
>I've tried accepting the dates as strings and as datetimes, etc.
>
>I've tried DateTime.Parse(). I can't seem to get this very simple task to work.
>
>Can anyone help? :)
>
>Thanks,
>Paul
Alexandre Palma
Senior Application Architect
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform