Must be something really dumb... won't compile SetKey, etc. lazarus / 16-Databases ---------------------------------------------------------------------- worldttle · 2013-12-11 01:34 Learning Lazarus.  Created a simple dbase table with one index key. I can employ Table1.First, Table1.Last, Table1.Prior ... methods. But when I add Table1.SetKey or Table1.GotoNearest then the program will not compile with error message 'Error: identifier idents no member "SetKey"' or 'no member 'no member "GotoNearest"'. Running under Window 7.  Have out let out a Unit or something? Thanks. ---------------------------------------------------------------------- taazz · 2013-12-11 02:41 the error message says that the dataset component you are using does not have a setkey or gotoNearest method that you can use. Make sure that there is one. ---------------------------------------------------------------------- arneolav · 2013-12-11 08:21 This is depending on your Db. Read i Lazarus Db Torturial. http://wiki.freepascal.org/Lazarus_Database_Overview and http://wiki.freepascal.org/Lazarus_Tdbf_Tutorial You can try using "locate" this way: YourDb.Locate('YourFieldName', SearchWord,[]) or YourDb.Locate('YourFieldName', SearchWord,[loCaseInsensitive]) or YourDb.Locate('YourFieldName', SearchWord,[loCaseInsensitive, loPartialKey]) ---------------------------------------------------------------------- worldttle · 2013-12-11 18:49 That helps. I am guessing the problem is that  SetKey and GotoNearest are not methods in Tdbf as I have a dbf table. Yes, Locate works as you suggested after learning more about Tdbf. Thank you.