Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OleDB syntax with a Selected date Field
Message
De
19/11/2012 14:57:58
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01557578
Message ID:
01557601
Vues:
53
>Hi.
>Uiing C# to read in a VFP Table
>Trying to get a Select command form VFP with a date Field and using a parameter
>My Select Command that I want is like: Select * from MyTable where DateField >= MydateControl.Date
>
>I am using Oledb
>MydateControl is a c# Date Control and hlds current date
>I want to use a Parameter
>
>I end up getting a few different messages like Syntax error etc
>Anybody know the correct syntax for both the Select and adding the Parameter
>
>Tia
>Gerard
DateTime dt = DateTime.Now;
OleDbCommand test = new OleDbCommand();
test.Parameters.Add("@DateTime", OleDbType.DBDate);
test.Parameters["DateTime"] = dt.ToString("yyyyMMdd");
?
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform