Hi, got a date problem with TQueries....  I have this little bit of code:

    dm.Query.ParamByName('Separator').AsString := AObject;
    dm.Query.ParamByName('MeasDate').AsDateTime := StartDate;
    dm.st.Lines.Text := dm.Query.Text;
    dm.st.Edit;

dm.st.Edit gives me a form/memo with the contents of lines in it, which
shows:

select
  S.ConfigurationID,
  S.Separator,
  S.Vessel,
  S."Order",
  C.MeasDate,
  C.BrineFlow,
  C.SteamFlow,
  C.MassFlow,
  C.Enthalpy,
  C.Pressure,
  C.Temperature
from
  Separator S, CalcData C
where
  S.Vessel = C.Object AND
  S.Separator = ? AND
  C.MeasDate = ?

The ?'s in the last two lines WERE :Separator and :MeasDate respectively, is
it natural for them to be represented as ?'s????  Or is this what is
actually getting passed to the query...

The reason I ask is that for somereason the queries are now failing and not
returning any data, this is as far as I can tell, due to wrong date formats
being put in the SQL, however, I'm assigning the parameter via .AsDateTime
which I would have thought would work around those date inconsistancy
problems....

Any thoughts/ideas/suggestions or darn it - out-right solutions?

Mark


-- 
Mark Derricutt, Software Engineer
PB Power (NZ) Ltd

Derricutt, Mark.vcf

Reply via email to