Skip to content

Commit f47afbe

Browse files
Add files via upload
1 parent 0da364d commit f47afbe

File tree

89 files changed

+17041
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+17041
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
program Meta_Indices;
2+
3+
uses
4+
Forms,
5+
fSQLMainCompBase in '..\..\fSQLMainCompBase.pas' {frmSQLMainCompBase},
6+
fMetaIndices in 'fMetaIndices.pas' {frmMetaIndices};
7+
8+
{$R *.res}
9+
10+
begin
11+
Application.Initialize;
12+
Application.MainFormOnTaskbar := True;
13+
Application.CreateForm(TfrmMetaIndices, frmMetaIndices);
14+
Application.CreateForm(TfrmSQLMainCompBase, frmSQLMainCompBase);
15+
Application.Run;
16+
end.

‎Demos/SqlClient/MetaInfo/Indices/Meta_Indices.dproj

Lines changed: 529 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
inherited frmMetaIndices: TfrmMetaIndices
2+
Caption = 'Meta info about indices'
3+
ExplicitWidth = 602
4+
ExplicitHeight = 597
5+
PixelsPerInch = 96
6+
TextHeight = 13
7+
inherited pnlTitle: TPanel
8+
inherited lblTitle: TLabel
9+
Width = 244
10+
Caption = 'Meta info about indices'
11+
ExplicitWidth = 244
12+
end
13+
end
14+
inherited pnlMain: TPanel
15+
ExplicitHeight = 469
16+
inherited pnl1: TPanel
17+
ExplicitHeight = 382
18+
object pnl2: TPanel
19+
Left = 0
20+
Top = 0
21+
Width = 586
22+
Height = 382
23+
Align = alClient
24+
BevelOuter = bvNone
25+
TabOrder = 0
26+
object pnlConnection: TPanel
27+
Left = 0
28+
Top = 0
29+
Width = 586
30+
Height = 129
31+
Align = alTop
32+
BevelOuter = bvNone
33+
TabOrder = 0
34+
object btnFetch: TButton
35+
Left = 6
36+
Top = 52
37+
Width = 76
38+
Height = 25
39+
Cursor = crHandPoint
40+
Caption = 'Fetch'
41+
Enabled = False
42+
TabOrder = 3
43+
OnClick = btnFetchClick
44+
end
45+
object rgMain: TRadioGroup
46+
Left = 6
47+
Top = 12
48+
Width = 190
49+
Height = 37
50+
Cursor = crHandPoint
51+
Columns = 2
52+
ItemIndex = 0
53+
Items.Strings = (
54+
'mkIndexes'
55+
'mkIndexFields')
56+
TabOrder = 0
57+
OnClick = rgMainClick
58+
end
59+
object lbledtIndexName: TLabeledEdit
60+
Left = 407
61+
Top = 21
62+
Width = 121
63+
Height = 21
64+
EditLabel.Width = 32
65+
EditLabel.Height = 13
66+
EditLabel.Caption = 'Index:'
67+
Enabled = False
68+
LabelPosition = lpLeft
69+
TabOrder = 1
70+
end
71+
object lbledtTableName: TLabeledEdit
72+
Left = 245
73+
Top = 22
74+
Width = 121
75+
Height = 21
76+
EditLabel.Width = 30
77+
EditLabel.Height = 13
78+
EditLabel.Caption = 'Table:'
79+
LabelPosition = lpLeft
80+
TabOrder = 2
81+
end
82+
object mmoInfo: TMemo
83+
Left = 6
84+
Top = 84
85+
Width = 612
86+
Height = 39
87+
Color = clInfoBk
88+
Lines.Strings = (
89+
90+
'To fetch meta information click Fetch button. Use the radio butt' +
91+
'ons group to select the kind of meta info to fetch.')
92+
TabOrder = 4
93+
end
94+
end
95+
object mmoConsole: TMemo
96+
Left = 0
97+
Top = 129
98+
Width = 586
99+
Height = 253
100+
Align = alClient
101+
Font.Charset = DEFAULT_CHARSET
102+
Font.Color = clWindowText
103+
Font.Height = -13
104+
Font.Name = 'Courier New'
105+
Font.Style = []
106+
ParentFont = False
107+
ScrollBars = ssBoth
108+
TabOrder = 1
109+
end
110+
end
111+
end
112+
end
113+
inherited SqlClientConnection1: TSqlClientConnection
114+
ConnectionString = 'Transaction Binding="Implicit Unbind"'
115+
end
116+
end
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
unit fMetaIndices;
2+
3+
interface
4+
5+
uses
6+
Windows, Messages, SysUtils, Variants, Classes, Graphics,
7+
Controls, Forms, Dialogs, fSQLMainCompBase, CNClrLib.ADONet.Enums,
8+
CNClrLib.ADONet.Error, CNClrLib.ADONet.EventArgs,
9+
CNClrLib.ADONet.SqlEventArgs, DB, CNClrLib.ADONet.Client,
10+
CNClrLib.ADONet.SqlClient, StdCtrls, ExtCtrls;
11+
12+
type
13+
TfrmMetaIndices = class(TfrmSQLMainCompBase)
14+
pnl2: TPanel;
15+
pnlConnection: TPanel;
16+
btnFetch: TButton;
17+
rgMain: TRadioGroup;
18+
lbledtIndexName: TLabeledEdit;
19+
lbledtTableName: TLabeledEdit;
20+
mmoInfo: TMemo;
21+
mmoConsole: TMemo;
22+
procedure btnConnectClick(Sender: TObject);
23+
procedure btnFetchClick(Sender: TObject);
24+
procedure rgMainClick(Sender: TObject);
25+
private
26+
{ Private declarations }
27+
public
28+
{ Public declarations }
29+
end;
30+
31+
var
32+
frmMetaIndices: TfrmMetaIndices;
33+
34+
implementation
35+
36+
{$R *.dfm}
37+
38+
procedure TfrmMetaIndices.btnConnectClick(Sender: TObject);
39+
begin
40+
btnFetch.Enabled := False;
41+
inherited;
42+
btnFetch.Enabled := True;
43+
end;
44+
45+
procedure TfrmMetaIndices.btnFetchClick(Sender: TObject);
46+
begin
47+
if rgMain.ItemIndex = 0 then
48+
SqlClientConnection1.GetIndexes(lbledtTableName.Text, mmoConsole.Lines)
49+
else
50+
SqlClientConnection1.GetIndexFieldNames(lbledtTableName.Text, lbledtIndexName.Text, mmoConsole.Lines);
51+
52+
mmoConsole.Lines.Insert(0, 'Meta info about indices');
53+
mmoConsole.Lines.Insert(1, '');
54+
end;
55+
56+
procedure TfrmMetaIndices.rgMainClick(Sender: TObject);
57+
begin
58+
if rgMain.ItemIndex = 0 then
59+
lbledtIndexName.Enabled := False
60+
else
61+
lbledtIndexName.Enabled := True;
62+
end;
63+
64+
end.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
program Meta_StoredProc;
2+
3+
uses
4+
Forms,
5+
fSQLMainCompBase in '..\..\fSQLMainCompBase.pas' {frmSQLMainCompBase},
6+
fMetaStoredProc in 'fMetaStoredProc.pas' {frmMetaStoredProc};
7+
8+
{$R *.res}
9+
10+
begin
11+
Application.Initialize;
12+
Application.MainFormOnTaskbar := True;
13+
Application.CreateForm(TfrmMetaStoredProc, frmMetaStoredProc);
14+
Application.CreateForm(TfrmSQLMainCompBase, frmSQLMainCompBase);
15+
Application.Run;
16+
end.

0 commit comments

Comments
 (0)