|
Fields.Free;
FOriginalSQL.Free;
FModifiedSQL.Free;
for i := 0 to FOriginalVariables.Count - 1 do
TDBVariable(FOriginalVariables[i]).Free;
FOriginalVariables.Free;
inherited Destroy;
end;
执行查询
function TDBFilterDialog.Execute : Boolean;
var
CurrentSQL : TStrings;
begin
//执行数据查询
CurrentSQL := TStrings(GetOrdProp(FDataSet, SQLProp));
// 检查SQL语句是否已经改变了
if not FModifiedSQL.Equals(CurrentSQL) then
OriginalSQL := CurrentSQL;
if FDialog.lstAllFields.Items.Count = 0 then
SetFields;
FDialog.grpSearchType.ItemIndex := Integer(FDefaultMatchType);
if fdShowCaseSensitive in Options then
FDialog.cbxCaseSensitive.Visible := true
else
FDialog.cbxCaseSensitive.Visible := false;
if fdShowNonMatching in Options then
FDialog.cbxNonMatching.Visible := true
else
FDialog.cbxNonMatching.Visible := false;
if fdCaseSensitive in Options then
FDialog.cbxCaseSensitive.Checked := true
else
FDialog.cbxCaseSensitive.Checked := false;
SaveParamValues;//保存参数值
Result := FDialog.ShowModal = mrOK; //点击确定按钮
if Result then
ReBuildSQL;//重建SQL语句
end;
上一页 [1] [2] [3] 没有相关教程
|