ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/design/ibselectsqleditor.pas
(Generate patch)

Comparing ibx/trunk/design/ibselectsqleditor.pas (file contents):
Revision 80 by tony, Mon Jan 1 11:31:07 2018 UTC vs.
Revision 380 by tony, Mon Jan 10 10:13:17 2022 UTC

# Line 42 | Line 42 | type
42    TIBSelectSQLEditorForm = class(TForm)
43      Button1: TButton;
44      Button2: TButton;
45 +    PackageNames: TIBLookupComboEditBox;
46      InputProcGrid: TIBDynamicGrid;
47 +    PackageNameLabel: TLabel;
48      OutputProcGrid: TIBDynamicGrid;
49      IncludeSysTables: TCheckBox;
50      GenerateBtn: TButton;
# Line 51 | Line 53 | type
53      PrimaryKeysGrid: TIBDynamicGrid;
54      IBSQLEditFrame1: TIBSQLEditFrame;
55      ProcedureNames: TIBLookupComboEditBox;
54    SelectProcedure: TLabel;
56      SelectSelectAll: TCheckBox;
57      SelectTableNames: TIBLookupComboEditBox;
58      TestBtn: TButton;
# Line 71 | Line 72 | type
72      procedure IncludeSysTablesChange(Sender: TObject);
73      procedure InputProcGridDblClick(Sender: TObject);
74      procedure OutputProcGridDblClick(Sender: TObject);
75 +    procedure PackageNamesDblClick(Sender: TObject);
76      procedure PrimaryKeysGridDblClick(Sender: TObject);
77      procedure ProcedureNamesDblClick(Sender: TObject);
78      procedure SelectSelectAllChange(Sender: TObject);
# Line 81 | Line 83 | type
83      procedure FormShow(Sender: TObject);
84      procedure PrimaryKeyListDblClick(Sender: TObject);
85      procedure SelectPageShow(Sender: TObject);
84    procedure UserProceduresAfterScroll(DataSet: TDataSet);
86    private
87      { private declarations }
88      procedure HandleUserTablesOpened(Sender: TObject);
# Line 113 | Line 114 | begin
114    try
115      if assigned(DataSet) then
116      begin
117 <        IBSQLEditFrame1.Database := DataSet.Database;
118 <        GenerateParams.Checked := DataSet.GenerateParamNames;
117 >      IBSQLEditFrame1.Database := DataSet.Database;
118 >      GenerateParams.Checked := DataSet.GenerateParamNames;
119      end;
120      IBSQLEditFrame1.SQLText.Lines.Assign(SelectSQL);
121 +    IBSQLEditFrame1.SelectProcs := true;
122      Result := ShowModal = mrOK;
123      if Result then
124      begin
# Line 140 | Line 142 | begin
142    begin
143      try
144        SetSQLStatementType(IBSQLEditFrame1.SyncQueryBuilder);
145 +      IncludeSysTables.Checked := IBSQLEditFrame1.IncludeSystemTables;
146      except  end;
147    end;
148   end;
# Line 151 | Line 154 | end;
154  
155   procedure TIBSelectSQLEditorForm.SelectPageShow(Sender: TObject);
156   begin
157 <  IBSQLEditFrame1.UserTables.Active := true;
158 < end;
156 <
157 < procedure TIBSelectSQLEditorForm.UserProceduresAfterScroll(DataSet: TDataSet);
158 < begin
159 <  SelectProcedure.Visible := DataSet.FieldByName('RDB$PROCEDURE_TYPE').AsInteger = 2;
157 >  if (IBSQLEditFrame1.Database <> nil) and IBSQLEditFrame1.Database.Connected then
158 >    IBSQLEditFrame1.UserTables.Active := true;
159   end;
160  
161   procedure TIBSelectSQLEditorForm.FieldListDblClick(Sender: TObject);
# Line 192 | Line 191 | begin
191    IBSQLEditFrame1.InsertSelectedOutputParam;
192   end;
193  
194 + procedure TIBSelectSQLEditorForm.PackageNamesDblClick(Sender: TObject);
195 + begin
196 +  IBSQLEditFrame1.InsertPackageName;
197 + end;
198 +
199   procedure TIBSelectSQLEditorForm.PrimaryKeysGridDblClick(Sender: TObject);
200   begin
201    IBSQLEditFrame1.InsertSelectedPrimaryKey;
# Line 219 | Line 223 | end;
223  
224   procedure TIBSelectSQLEditorForm.ExecutePageShow(Sender: TObject);
225   begin
226 <  IBSQLEditFrame1.UserProcedures.Active := true;
226 >  if (IBSQLEditFrame1.Database <> nil) and IBSQLEditFrame1.Database.Connected then
227 >    IBSQLEditFrame1.OpenUserProcedures;
228   end;
229  
230   procedure TIBSelectSQLEditorForm.HandleUserTablesOpened(Sender: TObject);
231   begin
232    SelectSelectAll.Checked := true;
228  SelectProcedure.Visible := false;
233   end;
234  
235   procedure TIBSelectSQLEditorForm.Loaded;
# Line 233 | Line 237 | begin
237    inherited Loaded;
238    if IBSQLEditFrame1 <> nil then
239    begin
240 +    if PageControl <> nil then
241 +      PageControl.ActivePage := SelectPage;
242      IBSQLEditFrame1.OnUserTablesOpened := @HandleUserTablesOpened;
243      if SelectTableNames <> nil then
244        SelectTableNames.ListSource :=  IBSQLEditFrame1.UserTableSource;
# Line 240 | Line 246 | begin
246        FieldNamesGrid.DataSource := IBSQLEditFrame1.FieldsSource;
247      if PrimaryKeysGrid <> nil then
248        PrimaryKeysGrid.DataSource := IBSQLEditFrame1.PrimaryKeySource;
249 +    if PackageNames <> nil then
250 +      PackageNames.ListSource := IBSQLEditFrame1.PackageNameSource;
251      if ProcedureNames <> nil then
252        ProcedureNames.ListSource := IBSQLEditFrame1.UserProcSource;
253      if InputProcGrid <> nil then

Comparing ibx/trunk/design/ibselectsqleditor.pas (property svn:eol-style):
Revision 80 by tony, Mon Jan 1 11:31:07 2018 UTC vs.
Revision 380 by tony, Mon Jan 10 10:13:17 2022 UTC

# Line 0 | Line 1
1 + native

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines