Re: [DUG] Searching ClientDataSet using locate

2008-11-06 Thread Robert martin
Hi Sorry misunderstood the question. I haven't done this stuff for a long time but found the following function that seems to do what you want... function TCustomProcessFunctionality.GetVarArray: Variant; //Breaks incoming values var TempList: TStringList; Counter : Integer;

Re: [DUG] Searching ClientDataSet using locate

2008-11-06 Thread Stephen Barker
''%'+findstr+'%'' or... or even do a brute force scan of all records in code. hth Steve -Original Message- From: John Bird [mailto:[EMAIL PROTECTED] Sent: Thursday, 6 November 2008 6:13 p.m. To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] Searching ClientDataSet

Re: [DUG] Searching ClientDataSet using locate

2008-11-06 Thread Neven MacEwan
''%'+findstr+'%'' or... or even do a brute force scan of all records in code. hth Steve -Original Message- From: John Bird [mailto:[EMAIL PROTECTED] Sent: Thursday, 6 November 2008 6:13 p.m. To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] Searching

Re: [DUG] Searching ClientDataSet using locate

2008-11-06 Thread Neven MacEwan
Subject: Re: [DUG] Searching ClientDataSet using locate Yes that would work for searching two fields, but do I do n fields - ie what I am trying to do is generalise and build a list of fields to search for at runtime where the number of fields to search changes (ie all where Datatype = ftString

Re: [DUG] Searching ClientDataSet using locate

2008-11-05 Thread Neven MacEwan
John Would you be better using filters and OnFilterRecord? Neven I am trying to make a generalised routine for searching a client dataset (it searches alpha fields matching a user supplied string and positions on the next matching record). So far I am doing this using the locate command

Re: [DUG] Searching ClientDataSet using locate

2008-11-05 Thread Robert martin
Hi John .Locate('Field1;Field1', VarArrayOf([Variable1, Variable2]) Works fine for me (all over the place but just with std TDataset) John Bird wrote: I am trying to make a generalised routine for searching a client dataset (it searches alpha fields matching a user supplied string and

Re: [DUG] Searching ClientDataSet using locate

2008-11-05 Thread John Bird
Yes that would work for searching two fields, but do I do n fields - ie what I am trying to do is generalise and build a list of fields to search for at runtime where the number of fields to search changes (ie all where Datatype = ftString) - I can build a string listing the wanted string fields,