Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server DateTime and Visual FoxPro
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
SQL Server DateTime and Visual FoxPro
Divers
Thread ID:
00883463
Message ID:
00883463
Vues:
50
I am using VFP 6.0 as a front end and SQL Server 2000 as a back end, with SQL passthru. I want to allow the user the ability to enter a date range in the format of 01/01/01 as an example. The SQL Server fields are of type DateTime. The following code works but seems like a bandage. Is there a “better” or different way to do this?

An example of code follows:
local  ldBeginDate, ldEndDate

ldBeginDate = Thisform.txtBeginDate.Value
ldEndDate = Thisform.txtEndDate.Value

ldBeginDate = ldBeginDate  + " 00:00:00 AM"
ldEndDate = ldEndDate  + " 12:59:59 PM"

SQLEXEC(tConnection, 'SELECT * FROM LineCall ;
 					where datecreated >= ?ldBeginDate ;
 					and datecreated <= ?ldEndDate ', 'cuLineCall')
Thank you for any suggestions.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform