如何使用 FindKey 函数?(50)

  • 主题发起人 主题发起人 tom12345
  • 开始时间 开始时间
T

tom12345

Unregistered / Unconfirmed
GUEST, unregistred user!
编译时显示:“ Undeclared identifier: 'FindKey'”,如何解决?
 
因为你没有建立该字段的索引~~Delphi 上说明DescriptionCall FindKey to search for a specific record in a dataset. KeyValues contains a comma-delimited array of field values, called a key. Each value in the key can be a literal, a variable, nil (Delphi) or NULL (C++). If the number of values passed in KeyValues is less than the number of columns in the index used for the search, the missing values are assumed to be null. KeyValues_Size specifies the index of the last value in KeyValues (one less than the total number of values supplied). In the statement below, the FindKey method is used to find the table row with the value "'Princess Island SCUBA" in the index field.
 
我建了索引的
 
用locate方法吧~~Locate('字段名',字段值,[]) ;
 
Locate 速度慢
 
uses dbtables
 
还是不行啊
 
uses dbclient
 
后退
顶部