procedure TForm1.GroupBox1Click(Sender: TObject);
begin
case TComponent(Sender).Tag of
0:
begin
if (DM.ADODataSet1.LockType = ltBatchOptimistic)
then
begin
DM.ADODataSet1.Filtered:=True;
DM.ADODataSet1.FilterGroup:=fgNone;
end;
end;
1:
begin
if (DM.ADODataSet1.LockType=ltBatchOptimstic)
then
begin
DM.ADODataSet1.Filtered:=True;
DM.ADODataSet1.FilterGroup:=fgPendingRecords;
end;
end;
end;
end;错误提示:
[Error] Unit1.pas(59): Undeclared identifier: 'ltBatchOptimistic'
[Error] Unit1.pas(59): Incompatible types
[Error] Unit1.pas(63): Incompatible types: 'TFilterGroup' and 'TRadioButton'
[Error] Unit1.pas(68): Undeclared identifier: 'ltBatchOptimstic'
[Error] Unit1.pas(68): Incompatible types
[Error] Unit1.pas(72): Incompatible types: 'TFilterGroup' and 'TRadioButton'
begin
case TComponent(Sender).Tag of
0:
begin
if (DM.ADODataSet1.LockType = ltBatchOptimistic)
then
begin
DM.ADODataSet1.Filtered:=True;
DM.ADODataSet1.FilterGroup:=fgNone;
end;
end;
1:
begin
if (DM.ADODataSet1.LockType=ltBatchOptimstic)
then
begin
DM.ADODataSet1.Filtered:=True;
DM.ADODataSet1.FilterGroup:=fgPendingRecords;
end;
end;
end;
end;错误提示:
[Error] Unit1.pas(59): Undeclared identifier: 'ltBatchOptimistic'
[Error] Unit1.pas(59): Incompatible types
[Error] Unit1.pas(63): Incompatible types: 'TFilterGroup' and 'TRadioButton'
[Error] Unit1.pas(68): Undeclared identifier: 'ltBatchOptimstic'
[Error] Unit1.pas(68): Incompatible types
[Error] Unit1.pas(72): Incompatible types: 'TFilterGroup' and 'TRadioButton'
2:把第二个ltBatchOptimstic改为:ltBatchOptimistic;
试过了能运行
其实 Undeclared identifier: 'ltBatchOptimistic' 这个错误应该是没有问题的,但怎么会报这个错误出来呢?