Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Whew!
Sat, Feb 18 2006 7:05 AMPermanent Link

"Ian Branch"
Didn't this take some nuttin out...Smiley

ttInvoices.Filter := 'WTYEXPORT<>'+QuotedStr('T')+
                    ' and Pos(trim(BOTH '+QuotedStr(#32)+' FROM
JOB_STATUS), '+QuotedStr(cNoWtyStat)+')>0'+
                    ' and Pos(trim( BOTH '+QuotedStr(#32)+' FROM
ACCTNUMB), '+QuotedStr(cNoWtyAccts)+')>0'+
                    ' and DATE_REP >=
'+QuotedStr(FormatDateTime('yyyy-mm-dd',
strToDate(StartDate.AsString)))+
                    ' and DATE_REP <=
'+QuotedStr(FormatDateTime('yyyy-mm-dd', strToDate(EndDate.AsString)));
ttInvoices.Filtered := True;


And it works!!

Ian

--
Sat, Feb 18 2006 8:38 AMPermanent Link

"R. Tipton"

> And it works!!

1st time ?

Rita

Sat, Feb 18 2006 4:47 PMPermanent Link

"Ian Branch"
Hi Rita,

R. Tipton wrote:

>
> 1st time ?
>
> Rita

Sticking something like that together, Yup.  Quite a learning experience, however I have broken its back now..

There's got to be an easier way.  I could hardly say it is what I would call readable code.

The thing that caught me out was the Trim() function.  It was the alluding to 'BOTH', that prompted
me to look at SQL syntax, then I remembered that DBISAM basically uses SQL syntax in its filters.

Things were so much easier in the .dbf days.Smiley

Regards,

Ian


--
Mon, Feb 20 2006 10:34 AMPermanent Link

"Herbert Sitz"
"Ian Branch" <branch@sitathome.net> wrote in message
news:5B6D87BB-3339-47F4-8CA4-1D6EC526833B@news.elevatesoft.com...
>
> Sticking something like that together, Yup.  Quite a learning experience,
however I have broken its back now..
>
> There's got to be an easier way.  I could hardly say it is what I would
call readable code.
>

I think the easier way is to use DBISAMQuery components with parameterized
SQL.

-- Herb

Image