delphi中Query+ataSource+DBGrid现在我要用什么函数才能在DBGrid中查找和定位某一条记录呢?
解决方案 »
- delphi 中有 c++ 中 typedef 的东西吗??哪位把这个代码翻译成 delphi代码啊?
- 各位前辈,在线急救!关于用DLP计算时间转换成积分的问题!
- 初学者的难题,各位救命阿 ,DBCombobox的问题
- 请教打开一个报表文件
- 谁有算命的源代码,或哪有下载?
- 简单问题,请帮手,在线等……
- 这样的窗体怎末创建?
- 大家帮忙看看一段代码好吗?
- 小菜鸟求教:重复使用unit,编译时说找不到.dcu文件
- multiple records found ,but only one was expected??这是什么错?????
- rave 报表发行的问题
- 怎样在一个button中调用dbnagativor的保存(勾)事件!在线等待
DBGRID自己会转到该记录的
Locate('Company;Contact;Phone', VarArrayOf(['Sight Diver', 'P', '408-431-1000']), [loPartialKey]);Options is a set that optionally specifies additional search latitude when searching on string fields. If Options contains the loCaseInsensitive setting, then Locate ignores case when matching fields. If Options contains the loPartialKey setting, then Locate allows partial-string matching on strings in KeyValues. If Options is an empty set, or if the KeyFields property does not include any string fields, Options is ignored.Locate returns True if it finds a matching record, and makes that record the current one. Otherwise Locate returns False.Locate uses the fastest possible method to locate matching records. If the search fields in KeyFields are indexed and the index is compatible with the specified search options, Locate uses the index. Otherwise Locate creates a filter for the search.