Happy Day.
I suggest you create a TDateTime variable (say, YourDate), load it with
your date, then use ParamByName('MeasDate').AsDateTime := YourDate. Then
you only have to ensure that you've loaded the YourDate correctly.
Cheers.
BJ...
----------
From: Mark Derricutt[SMTP:[EMAIL PROTECTED]]
Reply To: [EMAIL PROTECTED]
Sent: Friday, 5 February 1999 09:37
To: Multiple recipients of list delphi
Subject: [DUG]: SQL (again)
<<File: Mark Derricutt.vcf>>
I tell ya, this thing is REALLY starting to P**S me off....
If I hard code the string:
where
S.Vessel = C.Object AND
S.Separator = "SP1" AND
C.MeasDate = "04/01/1998"
every runs ok... (well, the datas crap cause its using wrong data).
but if I use:
where
S.Vessel = C.Object AND
S.Separator = :Separator AND
C.MeasDate = :MeasDate
with the code:
dm.Query.ParamByName('MeasDate').AsString :=
FormatDateTime('mm/dd/yyyy',StartDate);
the query doesn't open. The parameter is defined as being a string in the
params editor...
Is there anything simple I'm missing here???
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz