GpStructuredStorage file    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~sqli.vtd& sqliForm.vtdsqliFormName.vtd. sqliStep.vtdsqliStepFile.vtd 8sqliStepStr.vtd 6sqliStepStrEvent.vtd sqliVar.vtd sqliVer.vtdsqliReports.vtdacKeyacNamed acIsDebugacType acVarInINI acAutoStart acAutoClose acEndMessageacLocalization2acFormNameAuthoracActive anVersion acLogType acInstCoded anUserChg anUserIns adTimeChg adTimeIns acNoteacCompiledScriptEXERC13Exercise 13 - TreeViewFAFFFTRT0QnBB acKey acFormName2 acDocType acObjectName2acType acKeyShortCut2acTabSheetName2 anUserChg anUserIns adTimeChg adTimeIns acFormType acFormName2acName2acKeyanNoacViewacSetOfacDescracReportacFileCreateTableanFileDelimiter acFileNameacFileTableName acFileDest acFileType acFileTypeXML acShowIfEmptyacTitleButtons anTitleLinesanBeginFromRecord anUserChg anUserIns adTimeChg adTimeIns acCharSet2 acStyleSheet acUnitName2 acNewThreadacDFMacPAS acSQLExport2acSQLExpacNoteEXERC13GPFAENFSnB windows-1250 AresProjectFProgram AresProject; uses sysutils, classes, forms, dialogs, FForm1; begin //here we create table if not defDatabase.ObjectExists('parentchild') then ares.executeStep(2); Form1 := TForm1.create(ares); ares.run; end. EXERC13GFFAENFuPnB windows-1250FForm1Fobject Form1: TForm Tag = 99 Left = 208 Top = 243 ActiveControl = cxDBTreeList1 Caption = 'Form1' ClientHeight = 223 ClientWidth = 312 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False Position = poDesigned PixelsPerInch = 96 TextHeight = 13 object cxDBTreeList1: TcxDBTreeList Left = 0 Top = 0 Width = 312 Height = 223 Align = alClient Bands = < item end> BufferedPaint = False DataController.DataSource = DataSource1 DataController.ParentField = 'parent' DataController.KeyField = 'child' RootValue = -1 TabOrder = 0 object cxDBTreeList1cxDBTreeListColumn1: TcxDBTreeListColumn DataBinding.FieldName = 'acName' Width = 230 Position.ColIndex = 0 Position.RowIndex = 0 Position.BandIndex = 0 end object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn DataBinding.FieldName = 'adDate' Position.ColIndex = 1 Position.RowIndex = 0 Position.BandIndex = 0 end end object _evsaver: TEventCom end object DataSource1: TDataSource DataSet = dlDataset1 Left = 16 Top = 52 end object dlDataset1: TdlDataset SQL.Strings = ( 'select * from parentchild') FieldNamesToUpperCase = False AutoCalcFields = False Cached = False LocateInsert = False Editable = True RequestLive = False QueryRecCount = False DetailDelay = 0 LocalMasterDetail = False StrictUpdate = False TrimFixedChar = True TrimVarChar = True AddRowidToSQL = False ORACompatibility = True Left = 55 Top = 52 end end unit FForm1; interface uses Forms, Controls, StdCtrls, SysUtils, Classes, Graphics, dlcomponents, Dialogs, db, dlDatabase, cxTL, cxGrid; type TForm1 = class(TarForm) DataSource1: TDataSource; dlDataset1: TdlDataset; cxDBTreeList1: TcxDBTreeList; cxDBTreeList1cxDBTreeListColumn1: TcxDBTreeListColumn; cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn; private public constructor Create(AOwner: TComponent); override; end; var Form1: TForm1; implementation constructor TForm1.Create(AOwner: TComponent); begin inherited Create(AOwner); ares.AssignObjectsToForm('FForm1',Self); DataSource1 := FindComponent('DataSource1'); dlDataset1 := FindComponent('dlDataset1'); cxDBTreeList1 := FindComponent('cxDBTreeList1'); cxDBTreeList1cxDBTreeListColumn1 := FindComponent('cxDBTreeList1cxDBTreeListColumn1'); cxDBTreeList1cxDBTreeListColumn2 := FindComponent('cxDBTreeList1cxDBTreeListColumn2'); dlDataset1.active := true; end; end. EXERC13GMFAENFwRnB windows-12502Feif exists (select name from sysobjects where name = 'parentchild') drop table parentchild CREATE TABLE parentchild( parent int, child int, acName varchar(20) , adDate datetime, acCurrency char(3)) --populate some data INSERT INTO parentchild(parent, child, acName, adDate) VALUES (-1, 1, 'Alpha3232', '12.2.2008'); INSERT INTO parentchild(parent, child, acName) VALUES (-1, 2, 'Beta'); INSERT INTO parentchild(parent, child, acName) VALUES (-1, 3, 'Gama'); INSERT INTO parentchild(parent, child, acName) VALUES (1, 4, 'Delta'); INSERT INTO parentchild(parent, child, acName) VALUES (1, 5, 'Pi'); INSERT INTO parentchild(parent, child, acName) VALUES (1, 6, 'Fi'); INSERT INTO parentchild(parent, child, acName) VALUES (2, 7, 'Theta'); INSERT INTO parentchild(parent, child, acName) VALUES (2, 8, 'Epsilon'); acKeyanNoanSeqNoacHField2acHType anHLengthanHDecacPField2acPTypeanPLegthanPDec acPFormat acPSeparator anUserChg anUserIns adTimeChg adTimeIns acKeyanNoanSeqNo acFieldName2 anFieldSize acFieldTitleacFieldReadOnly acEditType acFieldConst anUserChg anUserIns adTimeIns adTimeChg acFieldFormatacFieldDefault acKeyanNo acDataEventacDataReturnValue acKeyAndNo anUserChg anUserIns adTimeChg adTimeIns acKey acWhereKeyanNo acFieldName acParamVar acFieldType acFieldREQacFieldCaption2 acDefaultExpacDefaultValue acLookUpSQL acOperator acVarHint2 acAddApostrof anUserChg anUserIns adTimeChg adTimeIns acPrtCrit ACKEY ANVERSIONANNOACSQLEXPACNOTE ADTIMECHG ANUSERCHG ADTIMEINS ANUSERINSACREPORTACLANGIDACLOCALIZATION2 ACFORMNAMEdACNAMEdACDEFAULTPRINTER ACPREVIEWANMAXPRSTLEVELACSUBSTITUTESIGNACPRINTIFEMPTY ACPRINTTOTEXT ANNOOFCOPY ACORDERBY ACREGUSERCODEACACTIVE ACKEYSHORTCUT2 ANUSERINS ADTIMEINS ANUSERCHG ADTIMECHG ACTEXT1ACTEXT2ACTEXT3ACNOTE ACREPORTDATA