實現 “一對多表”的相關例子代碼,用到有DB2數據庫,本頁主核心代碼,若需要完整的含數據庫版本,請在網頁下部點擊鏈接下載,本代碼編譯後的測試運行圖:
01
unit
Unit1;
02
interface
03
uses
04
Windows, Messages, Classes, SysUtils, Graphics, Controls, StdCtrls, Forms,
05
Dialogs, DBCtrls, DB, DBGrids, DBTables, Grids, ExtCtrls;
06
type
07
TForm1 =
class
(TForm)
08
Table2Name: TStringFIEld;
09
Table2Career: TStringFIEld;
10
Table2Salary: TSmallintFIEld;
11
Table1Name: TStringFIEld;
12
Table1Age: TStringFIEld;
13
Table1Address: TStringFIEld;
14
DBGrid1: TDBGrid;
15
DBGrid2: TDBGrid;
16
DBNavigator: TDBNavigator;
17
Panel1: TPanel;
18
DataSource1: TDataSource;
19
Panel2: TPanel;
20
Panel3: TPanel;
21
Splitter1: TSplitter;
22
Table1: TTable;
23
Table2: TTable;
24
DataSource2: TDataSource;
25
Label1: TLabel;
26
Label2: TLabel;
27
procedure
FormCreate(Sender: TObject);
28
private
29
{ private declarations }
30
public
31
{ public declarations }
32
end
;
33
var
34
Form1: TForm1;
35
implementation
36
{$R *.DFM}
37
TForm1
.
38
begin
39
{以下代碼是系統自動創建的}
40
Table1
Open;
41
Table2
42
43
以下是測試代碼:1program TestChar; 2
王爽老師書上說, CPU 內部主要就是寄存器.
TIWGrid 最終通過 Html Table 呈現; 其
TGPColor 是 GdiPlus 的顏色主體, 它雖然
本例效果圖: 源碼:unit Unit1; inter
//聲明: Rectangle( DC: HDC;