Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Search a VFP table for records with a future date?
Message
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00610191
Message ID:
00610199
Vues:
18
This message has been marked as the solution to the initial question of the thread.
VFP does not enclose dates in # #
it uses {}
eg
{^yyyy/mm/dd}
{^2001/01/01}




>Hi I am trying to return a recordset from a VFP table using ADO and VB6 SP5
>
>I only want records of a particular primary key and with a future date...
>
>I have tried lots of variations on this but here is the code...
>
>Call getTestRecordsetRO("select * from bookings where bo_to = #" & Date & "#", rsBook)
>
>Private Sub getTestRecordsetRO(strSQL As String, strRecordset As ADODB.Recordset)
>'get an updateable recordset
>Set strRecordset = New ADODB.Recordset
>SQL = strSQL
>strRecordset.Open SQL, DB, adOpenStatic, adLockReadOnly, adCmdText
>End Sub
>
>I get a couple of errors (depending on the variation I tried!) from "Missing Operand" to "Operator/Operand type mismatch"
>
>Any help greatly appreciated!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform