Board index » delphi » TBDEDataSet.Locate Options??

TBDEDataSet.Locate Options??

I'm using Delphi 4 and discovered the Locate method and was glad to see is
has a [loPartialKey] option to search on a partial key.  It also has a
[loCaseInsensitive] option.

My question is, how or can both options be used in the same locate
statement?  If so, what is the syntax.  I have tried the obvious (to me
anyway) and get errors during compile.

Thanks for any help or answers.

dougmun...@shaverlake.com

 

Re:TBDEDataSet.Locate Options??


Try with the following code :

Table1.Locate(fldName, fldText,[loCaseInsensitive, loPartialKey])

Can anyone  help me enhancing this loPartialKey. Here it searches at the
beginning
of the key. For example, it locates United if I search by writing UN.
But I want to search
anywhere in the field. It should locate United even if I write NI.

Thanks in advance.

Iqbal

Quote
Doug Munday wrote:
> I'm using Delphi 4 and discovered the Locate method and was glad to
> see is
> has a [loPartialKey] option to search on a partial key.  It also has a

> [loCaseInsensitive] option.

> My question is, how or can both options be used in the same locate
> statement?  If so, what is the syntax.  I have tried the obvious (to
> me
> anyway) and get errors during compile.

> Thanks for any help or answers.

> dougmun...@shaverlake.com

Re:TBDEDataSet.Locate Options??


Quote
>But I want to search
>anywhere in the field. It should locate United even if I write NI.

You will have to write code to itterate through the table and check each field
value or go to SQL and use LIKE

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:TBDEDataSet.Locate Options??


Would seem to me that Paradox was simply doing the iteration for you.
What's wrong with using "Like" in an Sql statement?
Quote
Iqbal kabir wrote:
> Thanks Mr. Bushy

> Itterate through the table is time consuming. I don't want to get the
> selected records only by using SQL LIKE. I want my user should jump from
> one record to another until he gets his desired one.

> I'm a Paradox programmer since '89, its version 3.0. It had zoom like
> Br.. (to locate Bridgeston Tyre) and also ..Ty.. (to locate Bridgeston
> Tyre). Its a matter of sorrow that this feature is absent after 10
> years. Thank you that you have made me realize, Otherwise I would have
> keep on wasting my time searching for it.

> Iqbal.

> Brian Bushay TeamB wrote:

> > >But I want to search
> > >anywhere in the field. It should locate United even if I write NI.

> > You will have to write code to itterate through the table and check
> > each field
> > value or go to SQL and use LIKE

> > --
> > Brian Bushay (TeamB)
> > Bbus...@NMPLS.com

Re:TBDEDataSet.Locate Options??


Thanks Mr. Bushy

Itterate through the table is time consuming. I don't want to get the
selected records only by using SQL LIKE. I want my user should jump from
one record to another until he gets his desired one.

I'm a Paradox programmer since '89, its version 3.0. It had zoom like
Br.. (to locate Bridgeston Tyre) and also ..Ty.. (to locate Bridgeston
Tyre). Its a matter of sorrow that this feature is absent after 10
years. Thank you that you have made me realize, Otherwise I would have
keep on wasting my time searching for it.

Iqbal.

Quote
Brian Bushay TeamB wrote:
> >But I want to search
> >anywhere in the field. It should locate United even if I write NI.

> You will have to write code to itterate through the table and check
> each field
> value or go to SQL and use LIKE

> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Re:TBDEDataSet.Locate Options??


Quote
>Itterate through the table is time consuming. I don't want to get the
>selected records only by using SQL LIKE. I want my user should jump from
>one record to another until he gets his desired one.

>I'm a Paradox programmer since '89, its version 3.0. It had zoom like
>Br.. (to locate Bridgeston Tyre) and also ..Ty.. (to locate Bridgeston
>Tyre).

And just what do you think is zoom command is doing to find those values?

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:TBDEDataSet.Locate Options??


I agree, I was upset that half the 'good' things in paradox never came
across to delphi. I was always hopeful that in the 'next' version of
Delphi or the BDE we would get it, but I've gone from D1 to D4, and
no luck.

However - there is hope! Their is a program called DBSearch (I believe
you can find it on the Delphi Super Site). This will do what you want.

I have been using the component for quite some time now, and find it
extremely handy.

HTH

Adam

Quote
Iqbal kabir wrote:

> Thanks Mr. Bushy

> Itterate through the table is time consuming. I don't want to get the
> selected records only by using SQL LIKE. I want my user should jump
> from one record to another until he gets his desired one.

> I'm a Paradox programmer since '89, its version 3.0. It had zoom like
> Br.. (to locate Bridgeston Tyre) and also ..Ty.. (to locate Bridgeston
> Tyre). Its a matter of sorrow that this feature is absent after 10
> years. Thank you that you have made me realize, Otherwise I would have
> keep on wasting my time searching for it.

> Iqbal.

Re:TBDEDataSet.Locate Options??


Quote
>I agree, I was upset that half the 'good' things in paradox never came
>across to delphi. I was always hopeful that in the 'next' version of
>Delphi or the BDE we would get it, but I've gone from D1 to D4, and
>no luck.

>However - there is hope! Their is a program called DBSearch (I believe
>you can find it on the Delphi Super Site). This will do what you want.

I find that InfoPower utlities get me just about everything from Paradox that
would be usefull in Delphi

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads