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

Comparing ibx/trunk/design/ibinsertsqleditor.pas (file contents):
Revision 80 by tony, Mon Jan 1 11:31:07 2018 UTC vs.
Revision 106 by tony, Thu Jan 18 14:37:35 2018 UTC

# Line 30 | Line 30 | unit ibinsertsqleditor;
30   interface
31  
32   uses
33 <  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
34 <    ibselectsqleditor, IBSQLEditFrame, IBDatabase, IBCustomDataset;
33 >  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
34 >  StdCtrls, ComCtrls, ibselectsqleditor, IBSQLEditFrame, IBDatabase,
35 >  IBLookupComboEditBox, IBDynamicGrid, IBCustomDataset;
36  
37   type
38  
39    { TIBInsertSQLEditorForm }
40  
41    TIBInsertSQLEditorForm = class(TIBSelectSQLEditorForm)
42 +    IdentityGrid: TIBDynamicGrid;
43 +    Label5: TLabel;
44 +    Label6: TLabel;
45 +    ReadOnlyGrid: TIBDynamicGrid;
46      procedure GenerateBtnClick(Sender: TObject);
47    private
48  
49 +  protected
50 +    procedure Loaded; override;
51 +
52    public
53  
54    end;
# Line 73 | Line 81 | begin
81      end;
82      with IBSQLEditFrame1 do
83      begin
76      IncludePrimaryKeys := true;
84        IncludeReadOnlyFields := false;
85        ExecuteOnlyProcs := true;
86 +      ExcludeIdentityColumns := true;
87        SQLText.Lines.Assign(SelectSQL);
88      end;
89      Result := ShowModal = mrOK;
# Line 100 | Line 108 | begin
108      IBSQLEditFrame1.GenerateInsertSQL(QuoteFields.Checked);
109   end;
110  
111 + procedure TIBInsertSQLEditorForm.Loaded;
112 + begin
113 +  inherited Loaded;
114 +  if IBSQLEditFrame1 <> nil then
115 +  begin
116 +   if PrimaryKeysGrid <> nil then
117 +     PrimaryKeysGrid.DataSource := IBSQLEditFrame1.PrimaryKeySource;
118 +   if IdentityGrid <> nil then
119 +     IdentityGrid.DataSource := IBSQLEditFrame1.IdentityColsSource;
120 +    if ReadOnlyGrid <> nil then
121 +      ReadOnlyGrid.DataSource := IBSQLEditFrame1.ReadOnlyFieldsSource;
122 +  end;
123 + end;
124 +
125  
126   end.
127  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines