Marco Cantù 1998, Mastering Delphi 4

Project: CORBACLI.DPR


Project Structure


CORBACLI.DPR

program CorbaCli;

uses
  Forms,
  CorCliF in 'CorCliF.pas' {Form1};

{$R *.RES}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.

CORCLIF.PAS

unit CorCliF;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  DBClient, CorbaCon, ExtCtrls, DBCtrls, StdCtrls, Mask, Db;

type
  TForm1 = class(TForm)
    CorbaConnection1: TCorbaConnection;
    ClientDataSet1: TClientDataSet;
    DataSource1: TDataSource;
    ClientDataSet1SpeciesNo: TFloatField;
    ClientDataSet1Category: TStringField;
    ClientDataSet1Common_Name: TStringField;
    ClientDataSet1SpeciesName: TStringField;
    ClientDataSet1Lengthcm: TFloatField;
    ClientDataSet1Length_In: TFloatField;
    ClientDataSet1Notes: TMemoField;
    ClientDataSet1Graphic: TGraphicField;
    Label1: TLabel;
    DBEdit1: TDBEdit;
    Label2: TLabel;
    DBEdit2: TDBEdit;
    Label3: TLabel;
    DBEdit3: TDBEdit;
    Label4: TLabel;
    DBEdit4: TDBEdit;
    Label5: TLabel;
    DBEdit5: TDBEdit;
    Label6: TLabel;
    DBEdit6: TDBEdit;
    Label7: TLabel;
    DBMemo1: TDBMemo;
    Label8: TLabel;
    DBImage1: TDBImage;
    DBNavigator1: TDBNavigator;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

end.

CORCLIF.DFM

object Form1: TForm1
  Left = 228
  Top = 107
  Width = 476
  Height = 409
  Caption = 'Corba Client Demo'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Label1: TLabel
    Left = 16
    Top = 8
    Width = 55
    Height = 13
    Caption = 'Species No'
    FocusControl = DBEdit1
  end
  object Label2: TLabel
    Left = 16
    Top = 48
    Width = 42
    Height = 13
    Caption = 'Category'
    FocusControl = DBEdit2
  end
  object Label3: TLabel
    Left = 16
    Top = 88
    Width = 75
    Height = 13
    Caption = 'Common_Name'
    FocusControl = DBEdit3
  end
  object Label4: TLabel
    Left = 16
    Top = 128
    Width = 69
    Height = 13
    Caption = 'Species Name'
    FocusControl = DBEdit4
  end
  object Label5: TLabel
    Left = 16
    Top = 168
    Width = 56
    Height = 13
    Caption = 'Length (cm)'
    FocusControl = DBEdit5
  end
  object Label6: TLabel
    Left = 88
    Top = 168
    Width = 48
    Height = 13
    Caption = 'Length_In'
    FocusControl = DBEdit6
  end
  object Label7: TLabel
    Left = 16
    Top = 216
    Width = 28
    Height = 13
    Caption = 'Notes'
    FocusControl = DBMemo1
  end
  object Label8: TLabel
    Left = 208
    Top = 216
    Width = 37
    Height = 13
    Caption = 'Graphic'
    FocusControl = DBImage1
  end
  object DBEdit1: TDBEdit
    Left = 16
    Top = 24
    Width = 64
    Height = 21
    DataField = 'Species No'
    DataSource = DataSource1
    TabOrder = 0
  end
  object DBEdit2: TDBEdit
    Left = 16
    Top = 64
    Width = 94
    Height = 21
    DataField = 'Category'
    DataSource = DataSource1
    TabOrder = 1
  end
  object DBEdit3: TDBEdit
    Left = 16
    Top = 104
    Width = 184
    Height = 21
    DataField = 'Common_Name'
    DataSource = DataSource1
    TabOrder = 2
  end
  object DBEdit4: TDBEdit
    Left = 16
    Top = 144
    Width = 244
    Height = 21
    DataField = 'Species Name'
    DataSource = DataSource1
    TabOrder = 3
  end
  object DBEdit5: TDBEdit
    Left = 16
    Top = 184
    Width = 64
    Height = 21
    DataField = 'Length (cm)'
    DataSource = DataSource1
    TabOrder = 4
  end
  object DBEdit6: TDBEdit
    Left = 88
    Top = 184
    Width = 81
    Height = 21
    DataField = 'Length_In'
    DataSource = DataSource1
    TabOrder = 5
  end
  object DBMemo1: TDBMemo
    Left = 16
    Top = 232
    Width = 185
    Height = 137
    DataField = 'Notes'
    DataSource = DataSource1
    TabOrder = 6
  end
  object DBImage1: TDBImage
    Left = 208
    Top = 232
    Width = 241
    Height = 137
    DataField = 'Graphic'
    DataSource = DataSource1
    Stretch = True
    TabOrder = 7
  end
  object DBNavigator1: TDBNavigator
    Left = 200
    Top = 16
    Width = 240
    Height = 25
    DataSource = DataSource1
    TabOrder = 8
  end
  object CorbaConnection1: TCorbaConnection
    Connected = True
    RepositoryId = 'Corba1/FirstCorba'
    Left = 56
    Top = 32
  end
  object ClientDataSet1: TClientDataSet
    Active = True
    Aggregates = <>
    Params = <>
    ProviderName = 'Table1'
    RemoteServer = CorbaConnection1
    Left = 112
    Top = 32
    object ClientDataSet1SpeciesNo: TFloatField
      FieldName = 'Species No'
    end
    object ClientDataSet1Category: TStringField
      FieldName = 'Category'
      Size = 15
    end
    object ClientDataSet1Common_Name: TStringField
      FieldName = 'Common_Name'
      Size = 30
    end
    object ClientDataSet1SpeciesName: TStringField
      FieldName = 'Species Name'
      Size = 40
    end
    object ClientDataSet1Lengthcm: TFloatField
      FieldName = 'Length (cm)'
    end
    object ClientDataSet1Length_In: TFloatField
      FieldName = 'Length_In'
      Precision = 5
    end
    object ClientDataSet1Notes: TMemoField
      FieldName = 'Notes'
      BlobType = ftMemo
      Size = 50
    end
    object ClientDataSet1Graphic: TGraphicField
      FieldName = 'Graphic'
      BlobType = ftGraphic
    end
  end
  object DataSource1: TDataSource
    DataSet = ClientDataSet1
    Left = 168
    Top = 32
  end
end


Copyright Marco Cantù 1998