RE: [DUG]: SQL and Parameters

2001-05-30 Thread Dennis Chuah
Neven, > I'd really like a DateToStrF function where you can pass the format string > i.e. DateToStrF(CurrentDate,'dd/MM/') Try this: FormatDateTime ('dd/MM/', Now); Regards, Dennis. --- New Zealand Delphi Us

Re: [DUG]: SQL and Parameters

2001-05-30 Thread Mark Howard
> - Original Message -> From: James Low <[EMAIL PROTECTED]>> To: Multiple recipients of list delphi <[EMAIL PROTECTED]>> Sent: Wednesday, 30 May 2001 16:11> Subject: RE: [DUG]: SQL and Parameters> > > > Maybe it cannot find an object because the query has

Re: [DUG]: SQL and Parameters

2001-05-29 Thread Bevan Edwards
> > HTH > > Neven > > - Original Message ----- > From: Mark Howard <[EMAIL PROTECTED]> > To: Multiple recipients of list delphi <[EMAIL PROTECTED]> > Sent: Wednesday, 30 May 2001 16:48 > Subject: Re: [DUG]: SQL and Parameters > > You were

RE: [DUG]: SQL and Parameters

2001-05-29 Thread James Low
riginal Message-From: Mark Howard [mailto:[EMAIL PROTECTED]]Sent: 30 May 2001 16:48To: Multiple recipients of list delphiSubject: Re: [DUG]: SQL and Parameters You were right.  I had no idea that I had to specifically add parameter objects to the TQuery.  I can't find any mention of

Re: [DUG]: SQL and Parameters

2001-05-29 Thread Neven MacEwan
Forget that use DateTimeToString Neven --- 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 "u

Re: [DUG]: SQL and Parameters

2001-05-29 Thread Neven MacEwan
From: Mark Howard <[EMAIL PROTECTED]> To: Multiple recipients of list delphi <[EMAIL PROTECTED]> Sent: Wednesday, 30 May 2001 16:48 Subject: Re: [DUG]: SQL and Parameters You were right. I had no idea that I had to specifically add parameter objects to the TQuery. I can't find any m

Re: [DUG]: SQL and Parameters

2001-05-29 Thread Mark Howard
list delphi Sent: Wednesday, May 30, 2001 4:11 PM Subject: RE: [DUG]: SQL and Parameters Maybe it cannot find an object because the query has NO parameters (I cannot see where your code creates one). So maybe you need to add (using CreateParam or otherwise)  a Param Object to the

Re: [DUG]: SQL and Parameters

2001-05-29 Thread Neven MacEwan
MainForm.Memo.Lines.Add('Done'); HTH Neven - Original Message - From: James Low <[EMAIL PROTECTED]> To: Multiple recipients of list delphi <[EMAIL PROTECTED]> Sent: Wednesday, 30 May 2001 16:11 Subject: RE: [DUG]: SQL and Parameters > Maybe it cannot find an

RE: [DUG]: SQL and Parameters

2001-05-29 Thread James Low
ll prepare. -Original Message-From: Mark Howard [mailto:[EMAIL PROTECTED]]Sent: 30 May 2001 15:41To: Multiple recipients of list delphiSubject: Re: [DUG]: SQL and Parameters Mike Have tried this change, now.  No better.  I assume the question about Short Date Format is onl

Re: [DUG]: SQL and Parameters

2001-05-29 Thread Mark Howard
Sent: Wednesday, May 30, 2001 3:22 PM Subject: Re: [DUG]: SQL and Parameters Mark Have you tried - ParamByName('SaveDate').AsDate := CurrentDate; as opposed to ParamByName('SaveDate').AsString := DateToStr(CurrentDate);   What is your Short Date

Re: [DUG]: SQL and Parameters

2001-05-29 Thread Mike Osborne
get "could not find object", I don't know.    HTH Mike   - Original Message - From: Mark Howard To: Multiple recipients of list delphi Sent: Wednesday, May 30, 2001 10:03 AM Subject: [DUG]: SQL and Parameters Hi   Using Paradox.  

Re: [DUG]: SQL and Parameters

2001-05-29 Thread Craig Goodall
Hi Mark, > should the parameter have been substituted, in the file that is written? Not sure. Like I said, I only use it to check my work when I'm modifying query lines at runtime. What about the settings in the TParams of the query's Params property, as I mentioned in my post? Are they ok? Can

Re: [DUG]: SQL and Parameters

2001-05-29 Thread Mark Howard
t;[EMAIL PROTECTED]> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> Sent: Wednesday, May 30, 2001 2:37 PM Subject: RE: [DUG]: SQL and Parameters > > BTW, I was meant to say that the SQL is not modified by parameters. When > the query is executed, the paramete

Re: [DUG]: SQL and Parameters

2001-05-29 Thread Mark Howard
Wednesday, May 30, 2001 2:36 PM Subject: RE: [DUG]: SQL and Parameters > > Type preparing the query before you set the parameter. > > Regards, > Dennis. > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Wed

RE: [DUG]: SQL and Parameters

2001-05-29 Thread Dennis Chuah
To: Multiple recipients of list delphi > Subject: Re: [DUG]: SQL and Parameters > > > Thanks for the response Craig. > > When I set the SaveDate parameter specifically (as below) and then do the > SaveToFile immediately before the SQL code is executed, the code > written out &

RE: [DUG]: SQL and Parameters

2001-05-29 Thread Dennis Chuah
Type preparing the query before you set the parameter. Regards, Dennis. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 30 May 2001 14:16 > To: Multiple recipients of list delphi > Subject: Re: [DUG]: SQL and Parameters >

Re: [DUG]: SQL and Parameters

2001-05-29 Thread Mark Howard
ate').AsString := '01/03/2001'; Prepare; SQL.SaveToFile('ResultSQLFile.txt'); ExecSQL; MainForm.Memo.Lines.Add('Done'); end; end; - Original Message - From: "Craig Goodall" <[EMAIL PROTECTED]> To: "Multiple recipie

Re: [DUG]: SQL and Parameters

2001-05-29 Thread Craig Goodall
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 qryMyQuer

Re: [DUG]: SQL and Parameters

2001-05-29 Thread Mark Howard
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 wo

[DUG]: SQL and Parameters

2001-05-29 Thread Mark Howard
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 DocketsWhere ForCode not in (Select distinct forcode from docketswhere docketdate > '03/31/2001'))   But when