以下语句报错: 这是51行 if ADOTable1.Filter:=null then
MessageDlg('Welcome to my Delphi application. Exit now?',
mtConfirmation, [mbYes, mbNo], 0, mbYes) = mrYes ; ADOTable1.Filtered:=true;在delphi 7 中的报错信息为:[Error] Unit1.pas(51): Type of expression must be BOOLEAN
[Error] Unit1.pas(53): Too many actual parameters
[Error] Unit1.pas(55): Missing operator or semicolon
[Fatal Error] Project1.dpr(6): Could not compile used unit 'Unit1.pas'
MessageDlg('Welcome to my Delphi application. Exit now?',
mtConfirmation, [mbYes, mbNo], 0, mbYes) = mrYes ; ADOTable1.Filtered:=true;在delphi 7 中的报错信息为:[Error] Unit1.pas(51): Type of expression must be BOOLEAN
[Error] Unit1.pas(53): Too many actual parameters
[Error] Unit1.pas(55): Missing operator or semicolon
[Fatal Error] Project1.dpr(6): Could not compile used unit 'Unit1.pas'
if ADOTable1.Filter = '' then
......
(MessageDlg('Welcome to my Delphi application. Exit now?',
mtConfirmation, [mbYes, mbNo], 0, mbYes) = mrYes) then ADOTable1.Filtered := true;
MessageDlg( 'Welcome to my Delphi application. Exit now?',
mtConfirmation, [mbYes, mbNo], 0);
(MessageDlg('Welcome to my Delphi application. Exit now?',
mtConfirmation, [mbYes, mbNo], 0) = mrYes )then
if ADOTable1.Filter = ' ' then
MessageDlg('Welcome to my Delphi application.Exit now?',
mtConfirmation, [mbYes, mbNo], 0, mbYes) = mrYes ; ADOTable1.Filtered:=true;end;现在报错: 为以下,Build
[Error] Unit1.pas(53): Too many actual parameters
[Fatal Error] Project1.dpr(6): Could not compile used unit 'Unit1.pas'MessageDlg 这个语句有什么不对的地方?
var
NewString: string;
begin
InputQuery('输入过滤条件','过滤品名为 ', NewString);
ADOTable1.Filter:='PM like '+''''+'%'+NewString+'%'+''''; if ADOTable1.Filter = '' then
MessageDlg('Welcome to my Delphi application.Exit now?',
mtConfirmation, [mbYes, mbNo], 0)
else ADOTable1.Filtered := trueend;运行时,要在对话框中输入品名,就可以查出我想要的查找的品名;
若什么也不输,会报错:Project project.exe raised exception class eoleexception with message ‘ 参数类型不正确,或不在可以接受的范围之内,或与其它参数冲突。‘ . process stopped . use step or run to continue . 不知是什么原因?
MessageDlg('Welcome to my Delphi application. Exit now?',
mtConfirmation, [mbYes, mbNo], 0, mbYes) = mrYes ;改为
if MessageDlg('Welcome to my Delphi application. Exit now?',
mtConfirmation, [mbYes, mbNo], 0, mbYes) = mrYes then
filtered:=false;
filter:='id=12';
filtered:=true;