If it is an Access ODBC driver you will need to either enclose your
date-literal inside a datavalue function
eg select * from table where field = datavalue('27/10/1999') or use #
instead of quote-marks. Note that if you enclose it in #'s it will
assume the date to be in US format ie M/D/Y, whereas using datevalue it
will assume the date is in whatever the global short date format is for
that computer. As Laurence mentioned you can insert #27/10/1999# in, and
its smart enough to figure out that it must be in D/M/Y format, but if
you were to insert #5/10/1999# it would actually insert the 10th of May
rather than the 5th of October, so you need to be careful using this.
> -----Original Message-----
> From: Tony Sinclair [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, 27 October 1999 17:10
> To: Multiple recipients of list delphi
> Subject: [DUG]: Database Explorer Date Literals
>
> Hi all,
>
> I am using database explorer to test an ODBC connection for different
> types of SQL and I am unable to get it to accept date literals in the
> WHERE clause. I am unsure as to whether I am using the correct
> delimiter and if so, does it depend on the SQL definition in the ODBC
> driver? e.g. the differences in Microsoft SQL and just about everyone
> elses SQL :-)
>
> If I use single quotes around various different types of date literal
> e.g. '16/09/99' or '16-09-99' etc I get a Invalid date, time or
> timestamp error (BDE Error 13059). If I use double quotes I get
> Invalid
> Column Name (BDE Error 9729). Suggestions anyone
>
> thanks in advance
>
> Tony Sinclair
> Holliday Group Limited
> Christchurch
> New Zealand
>
>
> ----------------------------------------------------------------------
> -----
> New Zealand Delphi Users group - Delphi List -
> [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz