🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.database
Article #2097

Access97 Problem: Error when using time value in WHERE clause. Help!

#2097
From: David M. Fornalsky
Date: Fri, 08 May 1998 00:00
22 lines
1524 bytes
Hi all,

I'm using Diamond Access v1.06 freeware component to select some
data from a table. The following query works fine:

   qryDAO.SQL.Add('SELECT notes FROM entries WHERE EntryDate = #3/30/98#');

But when I try to select against a field using a time value, Delphi3
gripes at me:

   qryDAO.SQL.Add('SELECT notes FROM entries WHERE TimeIn = #1:00:00 PM#');

The above line generates a 'syntax error in PARAMETER clause' error. I cut
and pasted the SELECT line into Access97 and it ran fine.

Any ideas how to add time information into the SQL where clause when
selecting against an Access97 database using Delphi? What am I doing
wrong?

 - Dave
cygnus@mcs.com
Technical Details
Message-ID: <6ivpql$1ak@enews2.newsguy.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ffff5,3f0b364812b8b695,start
X-Google-Attributes: gidffff5,public
X-Google-Thread: 10baee,3f0b364812b8b695,start
X-Google-Attributes: gid10baee,public
X-Google-Thread: 1043cf,3f0b364812b8b695,start
X-Google-Attributes: gid1043cf,public
X-Google-Thread: 115d96,3f0b364812b8b695,start
X-Google-Attributes: gid115d96,public
From: "David M. Fornalsky" <cygnus@mcs.com>
Subject: Access97 Problem: Error when using time value in WHERE clause. Help!
Date: 1998/05/08
Message-ID: <6ivpql$1ak@enews2.newsguy.com>
X-Deja-AN: 351547273
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Organization: http://extra.newsguy.com
Newsgroups: borland.public.delphi.database,borland.public.delphi.objectpascal,comp.lang.pascal.delphi.databases,comp.lang.pascal.delphi.misc