Hi Mark,
Could it be a problem in the settings of the Params property?
For a date I use
Datatype ftDate
ParamType ptInput
Maybe try putting a date into the Params Value property (it can stay
there forever as you are always overwriting it) and see what happens?
I've also used things like
qryMyQuery.SQL.SaveToFile('MyQuerySQL.txt'); // debug only
to view the actual query after I've modified lines. I generally do this
before setting params, but you could try it afterwards.
HTH,
Craig
Mark Howard wrote:
> Okay - Too vague? Further to my post below: The error is and
> EDBEngineError "Could not find object' and it occurs on the line that
> opens the query. Is there any way to get more specific information
> about the error? What sort of things would cause an error of this
> nature? Any help would be greatly appreciated. TIA Mark
>
> Hi Using Paradox. When I run the following SQL code
> (DocNos.Sql) using the LoadFromFile method, things work
> fine; Delete from DocketNos
> Where DocketNo in (
> Select DocketNo from Dockets
> Where ForCode not in (
> Select distinct forcode from dockets
> where docketdate > '03/31/2001')) But when I try to
> parameterise it as follows, and with the final line of the
> Sql file changed to : where docketdate > :SaveDate)) then I
> get an error message "Could not find object" procedure
> RunPQuery(SQLFile: string);
> begin
> with RSQuery do
> begin
> Close;
> Unprepare;
> SQL.LoadFromFile('DocNos.SQL');
> ParamByName('SaveDate').AsString :=
> DateToStr(CurrentDate);
> Prepare;
> Open;
> MainForm.Memo.Lines.Add('Done');
> end;
> end;Can any one see where I have gone wrong? TIA Mark
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"