Polariz666
Programmer
Hey guys,
I'm having a small bit of trouble with an SQL statement in VB6 and was wondering if any of you could help me.
The statement is as such:
rs.Open "SELECT Name, S, Time, Tid FROM TstArchive WHERE Time >= LIKE '" & passDateToQueryField.Text & "%' AND <= LIKE '" & passDateToQueryField2.Text & "%' ORDER BY Name ASC", db, adLockOptimistic
The passDateToQueryField Text boxes contain dates in the format: 20040924, thus i'm looking through the database for 20040924* strings (The full strings have a time inc seconds on the end: 20040924231401).
This has worked fine in the past however I now want to say between passDateToQueryField.Text and passDateToQueryField2.Text (IE Select all records between these two dates). However I get a syntax error (Missing Operator in Expression).
Any help appreciated.
Mike.
I'm having a small bit of trouble with an SQL statement in VB6 and was wondering if any of you could help me.
The statement is as such:
rs.Open "SELECT Name, S, Time, Tid FROM TstArchive WHERE Time >= LIKE '" & passDateToQueryField.Text & "%' AND <= LIKE '" & passDateToQueryField2.Text & "%' ORDER BY Name ASC", db, adLockOptimistic
The passDateToQueryField Text boxes contain dates in the format: 20040924, thus i'm looking through the database for 20040924* strings (The full strings have a time inc seconds on the end: 20040924231401).
This has worked fine in the past however I now want to say between passDateToQueryField.Text and passDateToQueryField2.Text (IE Select all records between these two dates). However I get a syntax error (Missing Operator in Expression).
Any help appreciated.
Mike.