OK so  it looks like you will need to do it the hard way and add the SQL srings into the query with code:
 
with Query do
  begin
    Screen.Cursor:=crHourglass;
    if Active then Close;
    SQL.Clear;
    SQL.Add('Select * from S,C where S.Vessel=C.Object ');
    SQL.Add(' and S.Seperator="'+sSP1+'" ');
    SQL.Add(' and C.MeasDate="'+FormatDateTime('mm/dd/yy',Date)+'"' );
    Open;
    Screen.Cursor:=crDefault;
  end;
 
 
Nigel Tavendale
-----Original Message-----
From: Mark Derricutt <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Date: Friday, 5 February 1999 11:30
Subject: [DUG]: SQL (again)

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???

Reply via email to