procedure TForm1.Button1Click(Sender: TObject);begin
with ADOTable1 do
begin
Label1.Caption := '';
Label2.Caption := '';
IndexFieldNames := 'name';
Adotable1.setkey;
FieldByName('name').AsString := Edit1.Text;
GotoKey;
If GotoKey then
begin
Label1.Caption :='查找成功';
Label2.Caption :=ADOTable1password.AsString;
end
else
Label1.Caption := '查找失败';
end;
end;
[Error] Unit1.pas(43): Undeclared identifier: 'setkey'
[Error] Unit1.pas(45): Undeclared identifier: 'GotoKey'
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'请大家帮我看下错误的原因。要如何才能解决???谢谢了,加我的QQ与我讲也行。272780979
with ADOTable1 do
begin
Label1.Caption := '';
Label2.Caption := '';
IndexFieldNames := 'name';
Adotable1.setkey;
FieldByName('name').AsString := Edit1.Text;
GotoKey;
If GotoKey then
begin
Label1.Caption :='查找成功';
Label2.Caption :=ADOTable1password.AsString;
end
else
Label1.Caption := '查找失败';
end;
end;
[Error] Unit1.pas(43): Undeclared identifier: 'setkey'
[Error] Unit1.pas(45): Undeclared identifier: 'GotoKey'
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'请大家帮我看下错误的原因。要如何才能解决???谢谢了,加我的QQ与我讲也行。272780979
解决方案 »
- excel数据导入到数据库---速度太慢求优化
- delphi 怎么控制IE浏览器
- 你们用DELPHI做的软件 皮肤是怎么做的啊
- 添加问题
- 对数据库进行操作后,如何动态更新treelist呢
- VCLSkin控件安装问题
- 统计:c/s & 三层; api & com (up有分)
- 求救,注册MsCommActivx,拿来使用时显示‘License information for TMSComm not found,you cannot use this contral in design’
- 奇怪啊!奇怪?我的打印机居然不听使唤,老板明天要炒人啦!
- 送分了,两个菜鸟问题。
- 用程序来创建表?
- 关于封包的一些问题
是没有这些方法,bde的控件才有把
Label2.Caption := '';
IndexFieldNames := 'name';
Adotable1.setkey;
Label1.Caption :='查找成功';
Label2.Caption :=ADOTable1password.AsString;
end
else
Label1.Caption := '查找失败';这些都将造成错误
Locate(),Lookup() 方法可以
else
Label2.Caption:='没有找到相关数据';