Board index » delphi » Question to TTable.Findkey, pls help !

Question to TTable.Findkey, pls help !

I can use TTable.Findkey to find record, however, I learnt I should use
TQeury when I am developing C/S app.
I used 'Where' clause in TQuery to locate a record.
however, I have two question.
1)
I have to code like this :
  Query1.Close;
  Query1.Paramsbyname('Cust_No').value := 'C0001';
  Query1.Open;
Will they slower than just ONE code ?
  Table1.Findkey(['C0001']);

2)
  I found there is one record (That I found) in the DBGrid.
But if I use TTable, There is just hte cursor sign at the found record.
I just feel the case od TQuery is NOT find, filter instead.

--
 /\_/\   /\_/\   /\_/\
( @ @ ) ( @ @ ) ( + + )
  -+-      0       ~

Pls visit my poor page !
@_@; http://users.vol.net/saturn

 

Re:Question to TTable.Findkey, pls help !


In article <3525C74E.F94E3...@usa.net>,

Quote
  mail.vol.net wrote:

> I can use TTable.Findkey to find record, however, I learnt I should use
> TQeury when I am developing C/S app.
> I used 'Where' clause in TQuery to locate a record.
> however, I have two question.
> 1)
> I have to code like this :
>   Query1.Close;
>   Query1.Paramsbyname('Cust_No').value := 'C0001';
>   Query1.Open;
> Will they slower than just ONE code ?
>   Table1.Findkey(['C0001']);

> 2)
>   I found there is one record (That I found) in the DBGrid.
> But if I use TTable, There is just hte cursor sign at the found record.
> I just feel the case od TQuery is NOT find, filter instead.

>Czech out TDataset's Locate method

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading

Other Threads