44 |
|
GenerateParams: TCheckBox; |
45 |
|
IBSQLEditFrame1: TIBSQLEditFrame; |
46 |
|
IncludeSysTables: TCheckBox; |
47 |
+ |
Label5: TLabel; |
48 |
+ |
Label6: TLabel; |
49 |
|
PrimaryKeysGrid: TIBDynamicGrid; |
50 |
+ |
IdentityGrid: TIBDynamicGrid; |
51 |
+ |
ReadOnlyGrid: TIBDynamicGrid; |
52 |
|
SelectSelectAll: TCheckBox; |
53 |
|
SelectTableNames: TIBLookupComboEditBox; |
54 |
|
TestBtn: TButton; |
122 |
|
GenerateParams.Checked := DataSet.GenerateParamNames; |
123 |
|
end; |
124 |
|
FDataSet := DataSet; |
125 |
+ |
with IBSQLEditFrame1 do |
126 |
+ |
IncludeReadOnlyFields := false; |
127 |
|
Result := ShowModal = mrOK; |
128 |
|
if Result and assigned(DataSet) then |
129 |
|
DataSet.GenerateParamNames := GenerateParams.Checked |
147 |
|
GenerateButton.Enabled := (IBSQLEditFrame1.Database <> nil) and IBSQLEditFrame1.Database.Connected; |
148 |
|
TestBtn.Enabled := (IBSQLEditFrame1.Database <> nil) and IBSQLEditFrame1.Database.Connected; |
149 |
|
FCurrentStatement := -1; |
150 |
< |
IBSQLEditFrame1.UserTables.Active := true; |
151 |
< |
IBSQLEditFrame1.SyncQueryBuilder(FSelectSQL); |
150 |
> |
if (IBSQLEditFrame1.Database <> nil) and IBSQLEditFrame1.Database.Connected then |
151 |
> |
begin |
152 |
> |
IBSQLEditFrame1.UserTables.Active := true; |
153 |
> |
IBSQLEditFrame1.SyncQueryBuilder(FSelectSQL); |
154 |
> |
end; |
155 |
|
end; |
156 |
|
|
157 |
|
procedure TIBDataSetEditorForm.FormClose(Sender: TObject; |
185 |
|
|
186 |
|
procedure TIBDataSetEditorForm.GenerateButtonClick(Sender: TObject); |
187 |
|
begin |
188 |
< |
IBSQLEditFrame1.GenerateSelectSQL(QuoteFields.Checked,FSelectSQL); |
189 |
< |
IBSQLEditFrame1.GenerateRefreshSQL(QuoteFields.Checked,FRefreshSQL); |
188 |
> |
IBSQLEditFrame1.GenerateSelectSQL(QuoteFields.Checked,FSelectSQL,true); |
189 |
> |
IBSQLEditFrame1.GenerateRefreshSQL(QuoteFields.Checked,FRefreshSQL,true); |
190 |
|
IBSQLEditFrame1.GenerateDeleteSQL(QuoteFields.Checked,FDeleteSQL); |
191 |
|
IBSQLEditFrame1.GenerateInsertSQL(QuoteFields.Checked,FInsertSQL); |
192 |
< |
IBSQLEditFrame1.GenerateModifySQL(QuoteFields.Checked,FModifySQL, not IncludePrimaryKeys.Checked); |
192 |
> |
IBSQLEditFrame1.GenerateModifySQL(QuoteFields.Checked,FModifySQL, IncludePrimaryKeys.Checked); |
193 |
|
FDirty := false; |
194 |
|
PageControl.ActivePage := SQLPage; |
195 |
|
end; |
257 |
|
FieldNamesGrid.DataSource := IBSQLEditFrame1.FieldsSource; |
258 |
|
if PrimaryKeysGrid <> nil then |
259 |
|
PrimaryKeysGrid.DataSource := IBSQLEditFrame1.PrimaryKeySource; |
260 |
+ |
if IdentityGrid <> nil then |
261 |
+ |
IdentityGrid.DataSource := IBSQLEditFrame1.IdentityColsSource; |
262 |
+ |
if ReadOnlyGrid <> nil then |
263 |
+ |
ReadOnlyGrid.DataSource := IBSQLEditFrame1.ReadOnlyFieldsSource; |
264 |
|
end; |
265 |
|
end; |
266 |
|
|