Board index » cppbuilder » Using Dates in Access 2K

Using Dates in Access 2K


2004-01-24 01:44:05 AM
cppbuilder39
Help. my application worked correctly when using Access 97 with the
BDE. The query used was:
select * from tblAppointments
where AppointmentDate=#02/02/2004#
order by AppointmentTime
But when I switched to Access 2000 using an ODBC alias I got the
error:
Invalid use of keyword
Token #02/02/2004#
How should I make a query with a litteral date value?
John
 
 

Re:Using Dates in Access 2K

Try using ' instead of # i.e.
where AppointmentDate='02/02/2004'
** Tom **
"John Scott" < XXXX@XXXXX.COM >wrote in message
Quote
Help. my application worked correctly when using Access 97 with the
BDE. The query used was:

select * from tblAppointments
where AppointmentDate=#02/02/2004#
order by AppointmentTime

But when I switched to Access 2000 using an ODBC alias I got the
error:

Invalid use of keyword
Token #02/02/2004#

How should I make a query with a litteral date value?

John