object fmMain: TfmMain
Left = 129
Top = 93
Width = 769
Height = 563
HorzScrollBar.Range = 753
VertScrollBar.Range = 527
ActiveControl = btOpen
AutoScroll = False
BorderIcons = [biSystemMenu, biMinimize]
Caption = 'Oracle Data Access Demo - working with Nested Tables'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = 11
Font.Name = 'MS Sans Serif'
Font.Pitch = fpVariable
Font.Style = []
OldCreateOrder = True
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object DBGrid1: TDBGrid
Left = 9
Top = 78
Width = 268
Height = 207
DataSource = DataSource1
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgConfirmDelete, dgCancelOnExit]
TabOrder = 0
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = 11
TitleFont.Name = 'MS Sans Serif'
TitleFont.Pitch = fpVariable
TitleFont.Style = []
end
object btOpen: TButton
Left = 9
Top = 9
Width = 80
Height = 27
Caption = 'Open'
TabOrder = 1
OnClick = btOpenClick
end
object DBNavigator1: TDBNavigator
Left = 9
Top = 43
Width = 250
Height = 27
DataSource = DataSource1
TabOrder = 2
end
object DBGrid2: TDBGrid
Left = 284
Top = 78
Width = 467
Height = 207
DataSource = DataSource2
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgConfirmDelete, dgCancelOnExit]
TabOrder = 3
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = 11
TitleFont.Name = 'MS Sans Serif'
TitleFont.Pitch = fpVariable
TitleFont.Style = []
end
object DBNavigator2: TDBNavigator
Left = 327
Top = 43
Width = 250
Height = 27
DataSource = DataSource2
TabOrder = 4
end
object btClose: TButton
Left = 90
Top = 9
Width = 81
Height = 27
Caption = 'Close'
TabOrder = 5
OnClick = btCloseClick
end
object btGetTable: TButton
Left = 17
Top = 310
Width = 96
Height = 27
Caption = 'Get Table'
TabOrder = 6
OnClick = btGetTableClick
end
object DBGrid3: TDBGrid
Left = 129
Top = 327
Width = 622
Height = 200
DataSource = DataSource3
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgConfirmDelete, dgCancelOnExit]
TabOrder = 7
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = 11
TitleFont.Name = 'MS Sans Serif'
TitleFont.Pitch = fpVariable
TitleFont.Style = []
end
object DBNavigator3: TDBNavigator
Left = 129
Top = 293
Width = 250
Height = 27
DataSource = DataSource3
TabOrder = 8
end
object btAppendTable: TButton
Left = 17
Top = 345
Width = 96
Height = 27
Caption = 'Append Table'
TabOrder = 9
OnClick = btAppendTableClick
end
object btUpdateTable: TButton
Left = 17
Top = 379
Width = 96
Height = 27
Caption = 'Update Table'
TabOrder = 10
OnClick = btUpdateTableClick
end
object btOpenNested: TButton
Left = 327
Top = 9
Width = 81
Height = 27
Caption = 'Open'
TabOrder = 11
OnClick = btOpenNestedClick
end
object btCloseNested: TButton
Left = 414
Top = 9
Width = 80
Height = 27
Caption = 'Close'
TabOrder = 12
OnClick = btCloseNestedClick
end
object btOpenTable: TButton
Left = 17
Top = 431
Width = 96
Height = 27
Caption = 'Open'
TabOrder = 13
OnClick = btOpenTableClick
end
object btCloseTable: TButton
Left = 17
Top = 465
Width = 96
Height = 27
Caption = 'Close'
TabOrder = 14
OnClick = btCloseTableClick
end
object btImportTable: TButton
Left = 396
Top = 293
Width = 113
Height = 27
Caption = 'Import Table'
TabOrder = 15
OnClick = btImportTableClick
end
object btCreate: TButton
Left = 586
Top = 9
Width = 81
Height = 27
Caption = 'Create'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = 12
Font.Name = 'MS Sans Serif'
Font.Pitch = fpVariable
Font.Style = [fsBold]
ParentFont = False
TabOrder = 16
OnClick = btCreateClick
end
object btDrop: TButton
Left = 672
Top = 9
Width = 81
Height = 27
Caption = 'Drop'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = 12
Font.Name = 'MS Sans Serif'
Font.Pitch = fpVariable
Font.Style = [fsBold]
ParentFont = False
TabOrder = 17
OnClick = btDropClick
end
object cbDebug: TCheckBox
Left = 588
Top = 48
Width = 97
Height = 17
Caption = 'Debug'
TabOrder = 18
OnClick = cbDebugClick
end
object DataSource1: TDataSource
DataSet = Query
Left = 32
Top = 96
end
object OraSession: TOraSession
Username = 'Scott'
Password = 'tiger'
ConnectDialog = ConnectDialog
Left = 176
Top = 8
end
object DataSource2: TDataSource
DataSet = OraNestedTable
Left = 288
Top = 96
end
object OraNestedTable: TOraNestedTable
DataSetField = QueryCONTENT
Left = 240
Top = 8
end
object Query: TSmartQuery
Session = OraSession
SQL.Strings = (
'SELECT T.RowId, T.* FROM ODAC_NestedTable T'
'')
Debug = True
LockMode = lmNone
ObjectView = True
Left = 208
Top = 8
object QueryCODE: TFloatField
FieldName = 'CODE'
end
object QueryCONTENT: TOraDataSetField
FieldName = 'CONTENT'
ObjectType = 'SCOTT.TODACNESTEDTABLE'
IncludeObjectField = False
end
object QueryROWID: TStringField
FieldName = 'ROWID'
ReadOnly = True
Size = 18
end
end
object sqGet: TOraSQL
Session = OraSession
SQL.Strings = (
'begin'
' SELECT Content'
' INTO :Res'
' FROM ODAC_NestedTable'
' WHERE Code = :Code;'
'end;')
Debug = True
Left = 112
Top = 288
ParamData = <
item
DataType = ftDataSet
Name = 'Res'
end
item
DataType = ftUnknown
Name = 'Code'
end>
end
object OraNestedTable1: TOraNestedTable
Left = 208
Top = 288
end
object DataSource3: TDataSource
DataSet = OraNestedTable1
Left = 144
Top = 328
end
object sqAppend: TOraSQL
Session = OraSession
SQL.Strings = (
'declare'
' lCode NUMBER;'
'begin'
' SELECT Max(Code)'
' INTO lCode'
' FROM ODAC_NestedTable;'
''
' INSERT INTO ODAC_NestedTable'
' (Code, Content)'
' VALUES'
' (lCode + 1, :Value);'
''
' COMMIT;'
'end;'
'')
Debug = True
Left = 144
Top = 288
ParamData = <
item
DataType = ftUnknown
Name = 'Value'
end>
end
object sqUpdate: TOraSQL
Session = OraSession
SQL.Strings = (
'begin'
' UPDATE ODAC_NestedTable SET'
' Content = :Value'
' WHERE '
' Code = :Code;'
''
' COMMIT;'
'end;'
'')
Debug = True
Left = 176
Top = 288
ParamData = <
item
DataType = ftUnknown
Name = 'Value'
end
item
DataType = ftUnknown
Name = 'Code'
end>
end
object scCreate: TOraScript
Session = OraSession
SQL.Strings = (
''
'CREATE TYPE TODACNestedSubType AS OBJECT ('
' Num NUMBER,'
' Str VARCHAR2(10) '
');'
''
'CREATE TYPE TODACNestedType AS OBJECT ('
' Num NUMBER,'
' Str VARCHAR2(30),'
' Obj TODACNestedSubType,'
' Dat DATE'
');'
''
'CREATE TYPE TODACNestedTable AS TABLE OF TODACNestedType; '
''
'--CREATE TYPE TODACNestedTable AS TABLE OF VARCHAR2(30); '
''
'CREATE TABLE ODAC_NestedTable ('
' Code NUMBER PRIMARY KEY,'
' Content TODACNestedTable'
')'
'NESTED TABLE Content STORE AS Content_Table;'
''
'INSERT INTO ODAC_NestedTable'
' (Code, Content)'
'VALUES'
' (1, TODACNestedTable(TODACNestedType(111, '#39'AAAAA'#39', TODACNested' +
'SubType(44, '#39'YYY'#39'), NULL)));'
''
'INSERT INTO ODAC_NestedTable'
' (Code, Content)'
'VALUES'
' (2, TODACNestedTable(TODACNestedType(22, '#39'BBB'#39', TODACNestedSub' +
'Type(456, '#39'UUU'#39'), NULL),'
' TODACNestedType(333, '#39'TTT'#39', TODACNestedSu' +
'bType(234, '#39'SSSSS'#39'), NULL)));'
''
'COMMIT;')
Debug = True
Left = 624
Top = 40
end
object scDrop: TOraScript
Session = OraSession
SQL.Strings = (
'DROP TABLE ODAC_NestedTable;'
'DROP TYPE TODACNestedTable; '
'DROP TYPE TODACNestedType;'
'DROP TYPE TODACNestedSubType;')
Debug = True
Left = 656
Top = 40
end
object ConnectDialog: TConnectDialog
SavePassword = True
Caption = 'Connect'
UsernameLabel = 'Username'
PasswordLabel = 'Password'
ServerLabel = 'Server'
ConnectButton = 'Connect'
CancelButton = 'Cancel'
LabelSet = lsCustom
Left = 176
Top = 40
end
end