Page 1 of 1

Sqlite search

Posted: Fri 30 Aug 2013 11:59
by jota
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

Re: Sqlite search

Posted: Fri 30 Aug 2013 12:10
by AlexP
Hello,

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

Re: Sqlite search

Posted: Sat 31 Aug 2013 11:09
by jota
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.

Re: Sqlite search

Posted: Wed 04 Sep 2013 11:39
by ZEuS
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