31 |
|
|
32 |
|
uses |
33 |
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, |
34 |
< |
StdCtrls, ExtCtrls, ComCtrls, IBSystemTables, IBSQL, IBDatabase; |
34 |
> |
StdCtrls, ExtCtrls, ComCtrls, IBSystemTables, IBSQL, IBDatabase, IB; |
35 |
|
|
36 |
|
type |
37 |
|
|
40 |
|
TIBSQLEditorForm = class(TForm) |
41 |
|
Button1: TButton; |
42 |
|
Button2: TButton; |
43 |
+ |
GenerateParams: TCheckBox; |
44 |
|
GenerateBtn: TButton; |
45 |
|
IBTransaction1: TIBTransaction; |
46 |
|
Label5: TLabel; |
103 |
|
FTableName: string; |
104 |
|
FIBSystemTables: TIBSystemTables; |
105 |
|
FExecuteOnly: boolean; |
106 |
+ |
protected |
107 |
+ |
procedure Loaded; override; |
108 |
|
public |
109 |
|
{ public declarations } |
110 |
|
constructor Create(TheOwner: TComponent); override; |
137 |
|
try |
138 |
|
SetDatabase(DataSet.Database); |
139 |
|
SQLText.Lines.Assign(DataSet.SQL); |
140 |
+ |
GenerateParams.Checked := DataSet.GenerateParamNames; |
141 |
|
Result := ShowModal = mrOK; |
142 |
|
if Result then |
143 |
< |
DataSet.SQL.Assign(SQLText.Lines) |
143 |
> |
begin |
144 |
> |
DataSet.SQL.Assign(SQLText.Lines); |
145 |
> |
DataSet.GenerateParamNames := GenerateParams.Checked |
146 |
> |
end; |
147 |
|
finally |
148 |
|
Free |
149 |
|
end; |
242 |
|
|
243 |
|
procedure TIBSQLEditorForm.TestBtnClick(Sender: TObject); |
244 |
|
begin |
245 |
< |
FIBSystemTables.TestSQL(SQLText.Text); |
245 |
> |
FIBSystemTables.TestSQL(SQLText.Text,GenerateParams.Checked); |
246 |
|
end; |
247 |
|
|
248 |
|
procedure TIBSQLEditorForm.DeleteTableNamesCloseUp(Sender: TObject); |
372 |
|
FIBSystemTables.GetFieldNames(InsertTableNames.Text,InsertFieldsList.Items); |
373 |
|
end; |
374 |
|
|
375 |
+ |
procedure TIBSQLEditorForm.Loaded; |
376 |
+ |
begin |
377 |
+ |
inherited Loaded; |
378 |
+ |
{$IFDEF WINDOWS} |
379 |
+ |
if assigned(PageControl) then |
380 |
+ |
PageControl.TabPosition := tpTop; |
381 |
+ |
{$ENDIF} |
382 |
+ |
end; |
383 |
+ |
|
384 |
|
constructor TIBSQLEditorForm.Create(TheOwner: TComponent); |
385 |
|
begin |
386 |
|
inherited Create(TheOwner); |
400 |
|
end; |
401 |
|
|
402 |
|
end. |
387 |
– |
|