当前位置:主页>仓库管理软件> 列表

ADOTABLE的locate 方法是什么作用?具体各个参 找库存管理软件破解版

库存管理软件版1楼: 有没有具体的例子啊?

2楼: ADOTable1.Locate(''FieldName'',Edit1.Text,[loCaseInsensitive, loPartialKey]); 如库存管理软件破解版

3楼: Searches the dataset for a specified record and makes that record the current record.

寻找指定的数据集在一个数据集中 并让该数据集为当前数据集

Description

Call Locate to search a dataset for a specific row and make it the current row.

KeyFields is a string containing a semicolon-delimited list of field names on which to search.

KeyValues is a variant that specifies the values to match in the key fields. If KeyFields lists a single field, KeyValues specifies the value for that field on the desired row. To specify multiple search values, pass a variant array as KeyValues, or construct a variant array on the fly using the VarArrayOf routine. For example:

4楼: 1.Locate介绍
Function Locate ( const KeyFields: String; const KeyValues: Variant;
Options: TlocateOptions ) : Boolean; override;
2.说明
1)KeyFields:要查询字段名称
2)KeyValues:要查询字段值
3)TlocateOptions:参数值
——LoCaseInsensitive:是否区分大小写
——LoParatialKey:近似查询
3.注意
1)多个字段名用“;”号分开
2)多个字段值用Vararrayof([字段值1,字段值2 ])函数
if DM.ADOTable2.Locate(''用户名;密码'',vararrayof([self.Edit1.Text,edit2.Text]),[]) then
modalresult := mryes
else
begin
self.Tag := self.tag +1;
if self.Tag = 3 then
begin
showmessage(''密码错误,系统将要退出!'');
modalresult := mrcancel;
end
else
showmessage(''密码错误!'');
end;

5楼: 如果要查找完成提示"查找成功"如果没有这条记录提示“查找失败”该怎么写呢?

6楼: If Table1.locate。。。。。 then
showmessage(''成功'')
Else
showmessage(''失败'');

库存管理软件版7楼: If Table1.locate。。。。。是什么意思?具体怎么写啊?[:)]

8楼: 后面是你要查找的条件设置啊
If Table1.locate(条件设置) then


showmessage(''成功'')
Else
showmessage(''失败'');
上面的兄弟们已经把用法给出来了
仔细看看吧

9楼: 谢谢各位阿