RE: [DUG]: SQL (again)

1999-02-05 Thread Wade Auchterlonie
I think the date thing has been beaten out on this thread, but a comment on the offering below.   It's very tempting to use the double quote to delimit string data since delphi uses the single quote as a string delimiter, and too many quotes look ugly, but it you check where the sql standa

Re: [DUG]: SQL (again)

1999-02-04 Thread Nigel Tavendale
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="'+

RE: [DUG]: SQL (again)

1999-02-04 Thread BJ Wilson
DataType to ftOrange. Cheers. BJ... -- From: Aaron Scott-Boddendijk[SMTP:[EMAIL PROTECTED]] Reply To: [EMAIL PROTECTED] Sent: Friday, 5 February 1999 10:22 To: Multiple recipients of list delphi Subject:Re: [DUG]: SQL (again) >If I hard co

Re: [DUG]: SQL (again)

1999-02-04 Thread Aaron Scott-Boddendijk
>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 expectatio

Re: [DUG]: SQL (again)

1999-02-04 Thread Michelle
> >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: >etc etc I avoided using parameters - would that help? DateValue := FormatDateTime('dd-mm-'

Re: [DUG]: SQL (again)

1999-02-04 Thread pjones
Define it as a date and pass it a date using AsDateTime. "Mark Derricutt" <[EMAIL PROTECTED]> on 05/02/99 08:37:11 Please respond to [EMAIL PROTECTED] To: Multiple recipients of list delphi <[EMAIL PROTECTED]> cc:(bcc: Peter Jones/Logistics&Information Technology/Christchurch

RE: [DUG]: SQL (again)

1999-02-04 Thread BJ Wilson
Happy Day. I suggest you create a TDateTime variable (say, YourDate), load it with your date, then use ParamByName('MeasDate').AsDateTime := YourDate. Then you only have to ensure that you've loaded the YourDate correctly. Cheers. BJ... -- From: Mark Derricu