33 |
|
uses |
34 |
|
Classes, SysUtils, FileUtil, SynEdit, LResources, Forms, Controls, Graphics, |
35 |
|
Dialogs, StdCtrls, ComCtrls, ibinsertsqleditor, IBSQLEditFrame, |
36 |
< |
IBLookupComboEditBox, IBDynamicGrid, IBDatabase, IBSQL, IBQuery, IB; |
36 |
> |
IBLookupComboEditBox, IBDynamicGrid, IBDatabase, IBSQL, IBQuery, IB, Types, db; |
37 |
|
|
38 |
|
type |
39 |
|
|
41 |
|
|
42 |
|
TIBSQLEditorForm = class(TIBInsertSQLEditorForm) |
43 |
|
IncludePrimaryKeys: TCheckBox; |
44 |
+ |
SelectProcedure: TLabel; |
45 |
|
TabControl1: TTabControl; |
46 |
|
procedure FormShow(Sender: TObject); |
47 |
|
procedure GenerateBtnClick(Sender: TObject); |
48 |
|
procedure TabControl1Change(Sender: TObject); |
49 |
+ |
procedure UserProceduresAfterScroll(DataSet: TDataSet); |
50 |
|
private |
51 |
|
procedure SetupFlags; |
52 |
|
protected |
84 |
|
with IBSQLEditFrame1 do |
85 |
|
begin |
86 |
|
IncludeReadOnlyFields := true; |
87 |
< |
ExecuteOnlyProcs := false; |
87 |
> |
ExecuteOnlyProcs := true; |
88 |
> |
SelectProcs := true; |
89 |
|
SQLText.Lines.Assign(aIBSQL.SQL); |
90 |
|
end; |
91 |
|
IncludePrimaryKeys.Checked := false; |
114 |
|
SetupFlags; |
115 |
|
end; |
116 |
|
|
117 |
+ |
procedure TIBSQLEditorForm.UserProceduresAfterScroll(DataSet: TDataSet); |
118 |
+ |
begin |
119 |
+ |
SelectProcedure.Visible := (DataSet.FieldByName('RDB$PROCEDURE_TYPE').AsInteger = 1) |
120 |
+ |
and (Dataset.FieldByName('RDB$PROCEDURE_OUTPUTS').AsInteger > 0); |
121 |
+ |
if SelectProcedure.Visible then |
122 |
+ |
OutputProcGrid.Columns[0].Width := 30 |
123 |
+ |
else |
124 |
+ |
OutputProcGrid.Columns[0].Width := 0; |
125 |
+ |
end; |
126 |
+ |
|
127 |
|
procedure TIBSQLEditorForm.FormShow(Sender: TObject); |
128 |
|
begin |
129 |
|
inherited; |