>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).
Here you haven't specified column types so the binding occurs on
the database side with no prior expectations.
>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???
Here you are saying 'MeasDate' is a string... The database says no it isn't
it's a date... Try setting the the ParamType of MeasDate to ftDATE. I'm
not certain that this will work though. Note that .AsString sets the paramtype
to ftSTRING.
This is my limited understanding of how the parameter system works - anyone,
if I'm leading him astray yell now (or snigger quietly in a corner)...
--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz