113 |
|
try |
114 |
|
if assigned(DataSet) then |
115 |
|
begin |
116 |
< |
IBSQLEditFrame1.Database := DataSet.Database; |
117 |
< |
GenerateParams.Checked := DataSet.GenerateParamNames; |
116 |
> |
IBSQLEditFrame1.Database := DataSet.Database; |
117 |
> |
GenerateParams.Checked := DataSet.GenerateParamNames; |
118 |
|
end; |
119 |
|
IBSQLEditFrame1.SQLText.Lines.Assign(SelectSQL); |
120 |
|
Result := ShowModal = mrOK; |
151 |
|
|
152 |
|
procedure TIBSelectSQLEditorForm.SelectPageShow(Sender: TObject); |
153 |
|
begin |
154 |
< |
IBSQLEditFrame1.UserTables.Active := true; |
154 |
> |
if (IBSQLEditFrame1.Database <> nil) and IBSQLEditFrame1.Database.Connected then |
155 |
> |
IBSQLEditFrame1.UserTables.Active := true; |
156 |
|
end; |
157 |
|
|
158 |
|
procedure TIBSelectSQLEditorForm.UserProceduresAfterScroll(DataSet: TDataSet); |
220 |
|
|
221 |
|
procedure TIBSelectSQLEditorForm.ExecutePageShow(Sender: TObject); |
222 |
|
begin |
223 |
< |
IBSQLEditFrame1.UserProcedures.Active := true; |
223 |
> |
if (IBSQLEditFrame1.Database <> nil) and IBSQLEditFrame1.Database.Connected then |
224 |
> |
IBSQLEditFrame1.UserProcedures.Active := true; |
225 |
|
end; |
226 |
|
|
227 |
|
procedure TIBSelectSQLEditorForm.HandleUserTablesOpened(Sender: TObject); |
235 |
|
inherited Loaded; |
236 |
|
if IBSQLEditFrame1 <> nil then |
237 |
|
begin |
238 |
+ |
if PageControl <> nil then |
239 |
+ |
PageControl.ActivePage := SelectPage; |
240 |
|
IBSQLEditFrame1.OnUserTablesOpened := @HandleUserTablesOpened; |
241 |
|
if SelectTableNames <> nil then |
242 |
|
SelectTableNames.ListSource := IBSQLEditFrame1.UserTableSource; |