ODAC 5.7.0.28

源代码在线查看: main.nfm

软件大小: 2737 K
上传用户: Kunlun_mrpii
关键词: ODAC 28
下载地址: 免注册下载 普通下载 VIP

相关代码

				object fmMain: TfmMain
				  Left = 184
				  Top = 165
				  Width = 774
				  Height = 446
				  VertScrollBar.Range = 51
				  ActiveControl = btClose
				  AutoScroll = False
				  Caption = 'Oracle Data Access Demo - Oracle8 Objects'
				  Color = clBtnFace
				  Font.Charset = DEFAULT_CHARSET
				  Font.Color = clWindowText
				  Font.Height = 11
				  Font.Name = 'MS Sans Serif'
				  Font.Pitch = fpVariable
				  Font.Style = []
				  OldCreateOrder = True
				  WindowState = wsMaximized
				  OnShow = FormShow
				  PixelsPerInch = 96
				  TextHeight = 13
				  object ToolBar1: TPanel
				    Left = 0
				    Top = 0
				    Width = 766
				    Height = 26
				    Align = alTop
				    TabOrder = 0
				    object btOpen: TButton
				      Left = 0
				      Top = 2
				      Width = 75
				      Height = 22
				      Caption = 'Open'
				      TabOrder = 0
				      OnClick = btOpenClick
				    end
				    object btClose: TButton
				      Left = 75
				      Top = 2
				      Width = 75
				      Height = 22
				      Caption = 'Close'
				      TabOrder = 1
				      OnClick = btCloseClick
				    end
				    object DBNavigator1: TDBNavigator
				      Left = 150
				      Top = 2
				      Width = 240
				      Height = 22
				      DataSource = dsData
				      TabOrder = 2
				    end
				    object btCreate: TButton
				      Left = 409
				      Top = 2
				      Width = 75
				      Height = 22
				      Caption = 'Create'
				      Font.Charset = DEFAULT_CHARSET
				      Font.Color = clWindowText
				      Font.Height = 11
				      Font.Name = 'MS Sans Serif'
				      Font.Pitch = fpVariable
				      Font.Style = [fsBold]
				      ParentFont = False
				      TabOrder = 3
				      OnClick = btCreateClick
				    end
				    object btDrop: TButton
				      Left = 484
				      Top = 2
				      Width = 75
				      Height = 22
				      Caption = 'Drop'
				      Font.Charset = DEFAULT_CHARSET
				      Font.Color = clWindowText
				      Font.Height = 11
				      Font.Name = 'MS Sans Serif'
				      Font.Pitch = fpVariable
				      Font.Style = [fsBold]
				      ParentFont = False
				      TabOrder = 4
				      OnClick = btDropClick
				    end
				  end
				  object DBGrid: TDBGrid
				    Left = 0
				    Top = 51
				    Width = 766
				    Height = 368
				    Align = alClient
				    DataSource = dsData
				    TabOrder = 1
				    TitleFont.Charset = DEFAULT_CHARSET
				    TitleFont.Color = clWindowText
				    TitleFont.Height = 11
				    TitleFont.Name = 'MS Sans Serif'
				    TitleFont.Pitch = fpVariable
				    TitleFont.Style = []
				  end
				  object Panel: TPanel
				    Left = 0
				    Top = 26
				    Width = 766
				    Height = 25
				    Align = alTop
				    BevelOuter = bvNone
				    TabOrder = 2
				    object cbObjectView: TCheckBox
				      Left = 7
				      Top = 5
				      Width = 97
				      Height = 17
				      Caption = 'ObjectView'
				      TabOrder = 0
				      OnClick = cbObjectViewClick
				    end
				    object cbDebug: TCheckBox
				      Left = 95
				      Top = 5
				      Width = 66
				      Height = 17
				      Caption = 'Debug'
				      TabOrder = 1
				      OnClick = cbDebugClick
				    end
				    object btShowCountry: TButton
				      Left = 168
				      Top = 2
				      Width = 105
				      Height = 22
				      Caption = 'ShowCountry'
				      TabOrder = 2
				      OnClick = btShowCountryClick
				    end
				    object btAddRecord: TButton
				      Left = 281
				      Top = 2
				      Width = 75
				      Height = 22
				      Caption = 'Add Record'
				      TabOrder = 3
				      OnClick = btAddRecordClick
				    end
				    object btCloneObject: TButton
				      Left = 364
				      Top = 2
				      Width = 75
				      Height = 22
				      Caption = 'Clone Object'
				      TabOrder = 4
				      OnClick = btCloneObjectClick
				    end
				    object btCallMethod: TButton
				      Left = 448
				      Top = 2
				      Width = 75
				      Height = 22
				      Caption = 'Call Method'
				      TabOrder = 5
				      OnClick = btCallMethodClick
				    end
				  end
				  object dsData: TDataSource
				    DataSet = Query
				    Left = 24
				    Top = 80
				  end
				  object Query: TSmartQuery
				    Session = OraSession
				    SQL.Strings = (
				      'SELECT RowId, RowNum, E.* FROM ODAC_Emp E')
				    Debug = True
				    FetchRows = 20
				    LockMode = lmNone
				    RefreshOptions = [roAfterInsert, roAfterUpdate]
				    ObjectView = True
				    Left = 240
				    Top = 56
				  end
				  object OraSession: TOraSession
				    Username = 'Scott'
				    Password = 'tiger'
				    Server = 'ora'
				    ConnectDialog = ConnectDialog1
				    Left = 176
				    Top = 56
				  end
				  object ConnectDialog1: TConnectDialog
				    Caption = 'Connect'
				    UsernameLabel = 'Username'
				    PasswordLabel = 'Password'
				    ServerLabel = 'Server'
				    ConnectButton = 'Connect'
				    CancelButton = 'Cancel'
				    LabelSet = lsCustom
				    Left = 208
				    Top = 56
				  end
				  object scCreate: TOraScript
				    Session = OraSession
				    SQL.Strings = (
				      ''
				      'CREATE TYPE TAddress AS OBJECT ('
				      '  Country VARCHAR2(30),'
				      '  City VARCHAR2(30),'
				      '  Street VARCHAR2(30),'
				      '  Apartment NUMBER'
				      ');'
				      ''
				      'CREATE OR REPLACE'
				      'TYPE TPerson AS OBJECT ('
				      '  Name VARCHAR2(30),'
				      '  Address TAddress,'
				      '  Phone VARCHAR2(20),'
				      '  BirthDate DATE,'
				      ''
				      '  MEMBER FUNCTION getName RETURN VARCHAR2,'
				      '  STATIC FUNCTION getClass RETURN VARCHAR2'
				      ');'
				      ''
				      'CREATE OR REPLACE'
				      'TYPE BODY TPerson'
				      'as'
				      '  MEMBER FUNCTION getName RETURN VARCHAR2'
				      '  is'
				      '  begin'
				      '    return Name;'
				      '  end;'
				      ''
				      '  STATIC FUNCTION getClass RETURN VARCHAR2'
				      '  is'
				      '  begin'
				      '    return '#39'TPerson'#39';'
				      '  end;'
				      'end;'
				      '/'
				      ''
				      'CREATE TABLE ODAC_Emp ('
				      '  Person TPerson,'
				      '  Job VARCHAR2(9),'
				      '  HireDate DATE,'
				      '  Sal NUMBER(7,2)'
				      ');'
				      ''
				      'INSERT INTO ODAC_Emp'
				      '  (Person, Job, HireDate, Sal)'
				      'VALUES'
				      
				        '  (TPerson('#39'SMITH'#39', TAddress('#39'UK'#39', '#39'London'#39', '#39'Street'#39', 12), '#39'467' +
				        '7676'#39', To_Date('#39'12.06.68'#39', '#39'dd.mm.yy'#39')), '#39'CLERK'#39', To_Date('#39'06.07' +
				        '.85'#39', '#39'dd.mm.yy'#39'), 800);'
				      ''
				      'INSERT INTO ODAC_Emp'
				      '  (Person, Job, HireDate, Sal)'
				      'VALUES'
				      
				        '  (TPerson('#39'JONES'#39', TAddress('#39'USA'#39', '#39'New York'#39', '#39'Street'#39', 418), ' +
				        #39'5689676'#39', To_Date('#39'19.07.65'#39', '#39'dd.mm.yy'#39')), '#39'MANAGER'#39', To_Date(' +
				        #39'23.10.95'#39', '#39'dd.mm.yy'#39'), 1600);'
				      ''
				      'INSERT INTO ODAC_Emp'
				      '  (Person, Job, HireDate, Sal)'
				      'VALUES'
				      
				        '  (TPerson('#39'SCOTT'#39', TAddress('#39'UK'#39', '#39'London'#39', '#39'Street'#39', 26), '#39'899' +
				        '0453'#39', To_Date('#39'01.01.70'#39', '#39'dd.mm.yy'#39')), '#39'PRESIDENT'#39', To_Date('#39'1' +
				        '6.02.81'#39', '#39'dd.mm.yy'#39'), 5000);'
				      ''
				      'INSERT INTO ODAC_Emp'
				      '  (Person, Job, HireDate, Sal)'
				      'VALUES'
				      
				        '  (TPerson('#39'MARTIN'#39', TAddress('#39'France'#39', '#39'Paris'#39', '#39'Street'#39', 162),' +
				        ' '#39'14557988'#39', To_Date('#39'12.01.72'#39', '#39'dd.mm.yy'#39')), '#39'ANALYST'#39', To_Dat' +
				        'e('#39'16.02.90'#39', '#39'dd.mm.yy'#39'), 2300);'
				      ''
				      'COMMIT;')
				    Debug = True
				    Left = 432
				    Top = 56
				  end
				  object scDrop: TOraScript
				    Session = OraSession
				    SQL.Strings = (
				      ''
				      'DROP TABLE ODAC_Emp;'
				      ''
				      'DROP TYPE TPerson;'
				      ''
				      'DROP TYPE TAddress;')
				    Debug = True
				    Left = 464
				    Top = 56
				  end
				  object OraSQL: TOraSQL
				    Session = OraSession
				    Debug = True
				    Left = 272
				    Top = 56
				  end
				  object spGetName: TOraStoredProc
				    StoredProcName = 'TPerson.getName'
				    Session = OraSession
				    SQL.Strings = (
				      'begin'
				      '  :RESULT := TPerson.getName(:SELF);'
				      'end;')
				    Debug = True
				    Left = 304
				    Top = 56
				    ParamData = <
				      item
				        DataType = ftString
				        Name = 'RESULT'
				        ParamType = ptInputOutput
				      end
				      item
				        DataType = ftADT
				        Name = 'SELF'
				        ParamType = ptInput
				        Value = 'Object'
				      end>
				  end
				end
							

相关资源