Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote view datetime filter
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01533628
Message ID:
01533630
Vues:
49
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody
>I have created a VFP9 view to get data from MS-SQL Server 2005. I want to filter records for a datetime filed. I have written datetime value like {^2011-01-01 00:00:00} but it does not accept. Any idea please. I do not want to use local view after it to make filter.
>
>Regards,


Use DATE() or DATETIME() function to generate the value you want and then use Parameters instead of built-in values:
ldDateTime = DATETIME(2011,1,1)
** or ldDate = DATE(2011,1,1)

SQLEXEC(Handler, "SELECT * FROM YourTable WHERE DateTimeColumn = ?m.ldDateTime","crsCursor")
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform