Sqlite search

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jota
Posts: 34
Joined: Tue 22 Nov 2011 19:21

Sqlite search

Post by jota » Fri 30 Aug 2013 11:59

Hi

I want search in sqlite table with a key

Do i need an index or put the table in the first record?, etc

I need a little example, please.

Thanks in advance

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Sqlite search

Post by AlexP » Fri 30 Aug 2013 12:10

Hello,

To search in an open DataSet, you can use the standard Locate method. http://docs.embarcadero.com/products/ra ... ocate.html

jota
Posts: 34
Joined: Tue 22 Nov 2011 19:21

Re: Sqlite search

Post by jota » Sat 31 Aug 2013 11:09

Hello AlexP

Thanks for your answer. It has helped me a lot, but my question was not clear, sorry.

I need an example to place the table in a record by finding a key and have that table sorted by that field, to continue reading table records sequentially, from the record found.

Sorry again and thanks.

ZEuS
Devart Team
Posts: 240
Joined: Thu 05 Apr 2012 07:32

Re: Sqlite search

Post by ZEuS » Wed 04 Sep 2013 11:39

In order to have the table sorted by some field(s), you can use the IndexFieldNames property of the dataset. To place the table in a record, the FindKey, Locate or LocateEx methods of the dataset can be used.
You can find more information about these methods in the LiteDAC documentation at our web-site:
http://www.devart.com/litedac/docs/deva ... dnames.htm
http://www.devart.com/litedac/docs/deva ... bject).htm
http://www.devart.com/litedac/docs/deva ... tions).htm
http://www.devart.com/litedac/docs/deva ... tions).htm

Post Reply