Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL-command with dates not working
Message
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
SQL-command with dates not working
Divers
Thread ID:
00466418
Message ID:
00466418
Vues:
38
I can not get the following Open-command to return a recordset that has
records only which is greater than "sqlDatumFrom". It's simply returning rercords
without concern of date. Can anyone tell me what's wrong.

Using VB6.0 with ADO and VFP ODBC.


sqlDatumFrom = CDate(txtDateFrom.Text)

If cboSort.Text = "Isolator" Then
lcSort = "article"
ElseIf cboSort.Text = "Löpnummer" Then
lcSort = "sernumber"
ElseIf cboSort.Text = "Datum" Then
lcSort = "date"
End If

sqlString = "Select * from isolator where article LIKE ' " & Trim(txtIsolator.Text) & "%'" & " AND sernumber LIKE ' " & Trim(txtSerNumber.Text) & "%' " _
& " AND Date > " & "{" & sqlDatumFrom & "}" & " ORDER BY " & lcSort

DataEnv.Recordsets("rdsSparade").Open (sqlString)

/Torgny
/Torgny
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform