32 |
|
|
33 |
|
uses |
34 |
|
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, |
35 |
< |
StdCtrls, ComCtrls, ibselectsqleditor, IBSQLEditFrame, IBLookupComboEditBox, |
35 |
> |
StdCtrls, ComCtrls, ibselectsqleditor, IBSQLEditFrame, |
36 |
|
IBDynamicGrid, IBDatabase, IBCustomDataset; |
37 |
|
|
38 |
|
type |
41 |
|
|
42 |
|
TIBModifySQLEditorForm = class(TIBSelectSQLEditorForm) |
43 |
|
IncludePrimaryKeys: TCheckBox; |
44 |
+ |
Label5: TLabel; |
45 |
+ |
ReadOnlyGrid: TIBDynamicGrid; |
46 |
|
procedure GenerateBtnClick(Sender: TObject); |
45 |
– |
procedure IncludePrimaryKeysChange(Sender: TObject); |
47 |
|
private |
48 |
|
|
49 |
+ |
protected |
50 |
+ |
procedure Loaded; override; |
51 |
+ |
|
52 |
|
public |
53 |
|
|
54 |
|
end; |
81 |
|
end; |
82 |
|
with IBSQLEditFrame1 do |
83 |
|
begin |
80 |
– |
IncludePrimaryKeys := false; |
84 |
|
IncludeReadOnlyFields := false; |
85 |
|
ExecuteOnlyProcs := true; |
86 |
|
SQLText.Lines.Assign(SelectSQL); |
100 |
|
|
101 |
|
{ TIBModifySQLEditorForm } |
102 |
|
|
103 |
< |
procedure TIBModifySQLEditorForm.IncludePrimaryKeysChange(Sender: TObject); |
103 |
> |
procedure TIBModifySQLEditorForm.Loaded; |
104 |
|
begin |
105 |
< |
IBSQLEditFrame1.IncludePrimaryKeys := IncludePrimaryKeys.Checked; |
105 |
> |
inherited Loaded; |
106 |
> |
if IBSQLEditFrame1 <> nil then |
107 |
> |
begin |
108 |
> |
if ReadOnlyGrid <> nil then |
109 |
> |
ReadOnlyGrid.DataSource := IBSQLEditFrame1.ReadOnlyFieldsSource; |
110 |
> |
end; |
111 |
|
end; |
112 |
|
|
113 |
|
procedure TIBModifySQLEditorForm.GenerateBtnClick(Sender: TObject); |
115 |
|
if PageControl.ActivePage = ExecutePage then |
116 |
|
IBSQLEditFrame1.GenerateExecuteSQL(QuoteFields.Checked) |
117 |
|
else |
118 |
< |
IBSQLEditFrame1.GenerateModifySQL(QuoteFields.Checked); |
118 |
> |
IBSQLEditFrame1.GenerateModifySQL(QuoteFields.Checked,IncludePrimaryKeys.Checked); |
119 |
|
end; |
120 |
|
|
121 |
|
|