Representing Recursive Relationships Using REP++ TreeView

Similar documents
Adapting a Grid to REP++

CALCULATOR APPLICATION

CSIS 1624 CLASS TEST 6

IBSDK Quick Start Tutorial for C# 2010

You can call the project anything you like I will be calling this one project slide show.

string spath; string sedifile = "277_005010X228.X12"; string sseffile = "277_005010X228.SemRef.EVAL0.SEF";

Start Visual Studio, create a new project called Helicopter Game and press OK

Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK.

Now find the button component in the tool box. [if toolbox isn't present click VIEW on the top and click toolbox]

Normalizing repository tables with the Normalization wizard

The Open Core Interface SDK has to be installed on your development computer. The SDK can be downloaded at:

// Specify SEF file to load. oschema = (edischema) oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format);

C:\homeworks\PenAttention_v13_src\PenAttention_v13_src\PenAttention4\PenAttention\PenAttention.cs 1 using System; 2 using System.Diagnostics; 3 using

GENESIS64 Using IRepository to Access Configuration Databases

To start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer

Object oriented lab /second year / review/lecturer: yasmin maki

First start a new Windows Form Application from C# and name it Interest Calculator. We need 3 text boxes. 4 labels. 1 button

This is the empty form we will be working with in this game. Look under the properties window and find the following and change them.

// Specify SEF file to load. edischema oschema = oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format);

Form Properties Window

Experiment 5 : Creating a Windows application to interface with 7-Segment LED display

We are going to use some graphics and found a nice little batman running GIF, off course you can use any image you want for the project.

namespace csharp_gen277x214 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

if (say==0) { k.commandtext = "Insert into kullanici(k_adi,sifre) values('" + textbox3.text + "','" + textbox4.text + "')"; k.

Mainly three tables namely Teacher, Student and Class for small database of a school. are used. The snapshots of all three tables are shown below.

Chapter 6 Dialogs. Creating a Dialog Style Form

private string sconnection = ConfigurationManager.ConnectionStrings["Development"].ConnectionString

Tutorial 5 Completing the Inventory Application Introducing Programming

Conventions in this tutorial

Click on the empty form and apply the following options to the properties Windows.

ListBox. Class ListBoxTest. Allows users to add and remove items from ListBox Uses event handlers to add to, remove from, and clear list

TARGETPROCESS PLUGIN DEVELOPMENT GUIDE

Developing for Mobile Devices Lab (Part 1 of 2)

FDSc in ICT. Building a Program in C#

Sub To Srt Converter. This is the source code of this program. It is made in C# with.net 2.0.

Start Visual Studio and create a new windows form application under C# programming language. Call this project YouTube Alarm Clock.

Savoy ActiveX Control User Guide

Visual Studio.NET.NET Framework. Web Services Web Forms Windows Forms. Data and XML classes. Framework Base Classes. Common Language Runtime

Main Game Code. //ok honestly im not sure, if i guess its a class ment for this page called methodtimer that //either uses the timer or set to timer..

Class Test 4. Question 1. Use notepad to create a console application that displays a stick figure. See figure 1. Question 2

Hands-On Lab. Lab: Client Object Model. Lab version: Last updated: 2/23/2011

private string sconnection = ConfigurationManager.ConnectionStrings["Development"].ConnectionString

Visual Basic/C# Programming (330)

Classes in C# namespace classtest { public class myclass { public myclass() { } } }

UNIT-3. Prepared by R.VINODINI 1

// Precondition: None // Postcondition: The address' name has been set to the // specified value set;

namespace csharp_gen837x223a2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

Contents Getting Started... 3 About Scribe Online and Connectors... 3 Scribe Online Services... 3 CDK Components... 3 Audience... 4 Prerequisites...

QUESTION: 1 Which of the following tools can you use to develop business logic in Microsoft Dynamics AX 2012? (Choose all that apply.) A. IntelliMorph

Inheriting Windows Forms with Visual C#.NET

namespace Gen837X222A1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

Writing Your First Autodesk Revit Model Review Plug-In

Follow these steps to get started: o Launch MS Access from your start menu. The MS Access startup panel is displayed:

INFORMATICS LABORATORY WORK #2

Activating AspxCodeGen 4.0

Create your own Meme Maker in C#

Visual Studio Windows Form Application #1 Basic Form Properties

An abstract tree stores data that is hierarchically ordered. Operations that may be performed on an abstract tree include:

CSE 431S Type Checking. Washington University Spring 2013

II. Programming Technologies

In-Class Worksheet #4

Lecture 8 Building an MDI Application

LIGHT_P_TOGGLE, LIGHT_N_TOGGLE, BATTERY_TOGGLE, ALTERNATOR_TOGGLE, AVIONICS_TOGGLE, FLOAT_RETRACT, FLOAT_EXTEND }

Tutorial 6 Enhancing the Inventory Application Introducing Variables, Memory Concepts and Arithmetic

If this is the first time you have run SSMS, I recommend setting up the startup options so that the environment is set up the way you want it.

XNA 4.0 RPG Tutorials. Part 11b. Game Editors

Visual Basic/C# Programming (330)

Chapter 12. Tool Strips, Status Strips, and Splitters

Quick Guide for the ServoWorks.NET API 2010/7/13

Your Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output

Using Template Bookmarks for Automating Microsoft Word Reports

Real World Foreach Loop Container example

Item 18: Implement the Standard Dispose Pattern

10Tec igrid for.net 6.0 What's New in the Release

DAD Lab. 1 Introduc7on to C#

User Filter State. Chapter 11. Overview of User Filter State. The PDSAUserFilterState Class

NI USB-TC01 Thermocouple Measurement Device

} } public void getir() { DataTable dt = vt.dtgetir("select* from stok order by stokadi");

Code Coverage. Copyright 2009 JADE Software Corporation Limited. All rights reserved.

The contents of this document are directly taken from the EPiServer SDK. Please see the SDK for further technical information about EPiServer.

Xton Access Manager GETTING STARTED GUIDE

เว บแอพล เคช น. private void Back_Click(object sender, EventArgs e) { this.webbrowser2.goback(); }

Bachelor s Thesis: Building Web Application for Mahabad University Graduate Affairs Afsaneh Nezami Savojbolaghi

Professional ASP.NET Web Services : Asynchronous Programming

Lab - 1. Solution : 1. // Building a Simple Console Application. class HelloCsharp. static void Main() System.Console.WriteLine ("Hello from C#.

C# winforms gridview

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

Hands-On Lab (MBL04) Lab Manual Incorporating COM Objects into Your.NET Compact Framework 2.0 Application

Code Coverage White Paper VERSION Copyright 2018 Jade Software Corporation Limited. All rights reserved.

Eyes of the Dragon - XNA Part 37 Map Editor Revisited

Engr 123 Spring 2018 Notes on Visual Studio

Hyperion Interactive Reporting Reports & Dashboards Essentials

Developer's Cookbook

// Program 2 - Extra Credit // CIS // Spring // Due: 3/11/2015. // By: Andrew L. Wright. //Edited by : Ben Spalding

Data Structures in Java

create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) )

Quick Start Guide. Version 3.0

i-power DMS - Document Management System Last Revised: 8/25/17 Version: 1.0

Spatial Data Standards for Facilities, Infrastructure, and Environment (SDSFIE)

Custom Control Tutorial

Transcription:

Representing Recursive Relationships Using REP++ TreeView Author(s): R&D Department Publication date: May 4, 2006 Revision date: May 2010 2010 Consyst SQL Inc. All rights reserved.

Representing Recursive Relationships Using REP++ TreeView Overview Recursive relationships are quite common in applications and need to be properly presented. To facilitate this process, the REP++toolkit for Windows includes a TreeViewRowsetTree component (or control) that already supports recursive relationships. TreeViewRowsetTree is a subclass of the.net Windows Forms TreeView component that is capable of interacting with the REP++ metadata. This article describes how to use the TreeViewRowsetTree component to represent recursive relationships. Direct vs. indirect recursion There are two ways to define recursion within a relational database: direct and indirect. A direct recursion is defined in the same table as the recursive entities. For instance, to define a direct recursion between folders, we need to add a column to the folder table so that every folder keeps a reference to its containing folder. The following figure illustrates a direct recursion between folders: An indirect recursion is defined in a separate table whose sole purpose is to represent the relationship between the recursive entities. For instance, to define an indirect recursion between folders, we need to create a separate table to keep a reference to every folder contained within a specific folder. The following figure illustrates an indirect recursion between folders: The TreeViewRowsetTree component To present recursion using a TreeViewRowsetTree component, you will follow the same strategy regardless of the type of recursion. The following tasks have to be done: Representing Recursive Relationships Using REP++ TreeView 1

Subclassing the TreeViewRowsetTree component. Retrieving the root entities (i.e. root folders). Defining the recursion by telling each node how to retrieve its descendants. Before you go on with the rest of the document, please make sure that you go over the list of pre requisites in the appendix (page 8) to: 1. Create and populate the sample database that you will use throughout the document. 2. Create and populate the REP++repository. 3. Create a project and generate the TypedInstances. Subclassing the TreeViewRowsetTree component for direct recursion The first step is to define a new class, TreeViewRecDirect, that inherits from the TreeViewRowsetTree class. using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Text; using System.Windows.Forms; using RepPP; using RepPP.Toolkit.Window; namespace Recursion { public partial class TreeViewRecDirect : TreeViewRowsetTree { Retrieving the root entities You will define a method that enables the hosting Windows form to initialize your TreeViewRecDirect control and have it load the root entities. The TreeViewRecDirect control will use the typed RowsetTree RTCFolder to load the data: public class TreeViewRecDirect : TreeViewRowsetTree { private RTCFOLDER m_rstroot; public TreeViewRecDirect() { InitializeComponent(); m_rstroot = null; public void Init(RepPP.Application app) { RowsetTreeDefNode nodefolder; if (m_rstroot == null) { m_rstroot = RTCFOLDER.Create(app); nodefolder = m_rstroot.rsfolder.rowsettreedefnode; m_rstroot.rowsettreedef.buildsqlcommand(); nodefolder.setselectsqlorderby("order BY FOLDERNAME"); nodefolder.setselectsqlwhere("where FATHERFOLDERID IS NULL"); Empty(); m_rstroot.readfromdb(); FillNodes(m_rstRoot.rsFOLDER, null); protected override void Dispose(bool disposing) { if (disposing) { Representing Recursive Relationships Using REP++ TreeView 2

if (m_rstroot!= null) { m_rstroot.dispose(); m_rstroot = null; base.dispose(disposing); As you can see, Init uses the REP++ Application object to read the sorted list of folders that do not have a parent folder, and then asks the tree to populate its nodes using the result. Defining a direct recursion Next, you need to tell the nodes of your TreeViewRecDirect control how to recursively get their descendants, and which icon they should display. This task will be accomplished by overriding OnSetNodeInfo as follows: public override void OnSetNodeInfo(SetNodeInfoEventArgs e) { RepPP.Toolkit.Window.TreeNodeRowset node; RCFOLDER rsfolder; node = e.node as RepPP.Toolkit.Window.TreeNodeRowset; node.nodetype = (int)findnodetype(node); switch ((NodeType)node.NodeType) { case NodeType.Folder: // Sets the bitmap of the node node.imageindex = 1; node.selectedimageindex = 1; // Tells the node how to get its descendants and in which order node.setrecursive1level("where FATHERFOLDERID=:FOLDER.FOLDERID", "ORDER BY FOLDERNAME"); // This is an optimization that prevents us from displaying // an expandable node when it does not have any descendants rsfolder = node.rowset as RCFOLDER; if (rsfolder.fldfilecount.typedvalue == 0 && rsfolder.fldsubfoldercount.typedvalue == 0) { node.nodes.clear(); break; case NodeType.File: // Sets the bitmap of the node node.imageindex = 0; node.selectedimageindex = 0; // File nodes are not recursive, so there is nothing left to do break; // DO NOT forget to call the base method base.onsetnodeinfo(e); Since this example uses direct recursion, SetRecursive1Level does not require the name of a different RowsetDef to load the descendants. Instead, it uses a simple WHERE clause to load all the folders whose parent is the folder represented by the node in question. OnSetNodeInfo uses a helper method named FindNodeType and an enumeration named NodeType to distinguish between File and Folder nodes: Representing Recursive Relationships Using REP++ TreeView 3

public class TreeViewRecDirect : TreeViewRowsetTree { public enum NodeType { Unknown = 0, Folder = 1, File = 2 ; private NodeType FindNodeType(TreeNode node) { NodeType eretval = NodeType.Unknown; TreeNodeRowset noderowset; noderowset = node as TreeNodeRowset; if (noderowset!= null) { if (noderowset.rowset.rowsetdef == m_rstroot.rsfolder.rowsetdef) { eretval = NodeType.Folder; else { eretval = NodeType.File; return (eretval); The TreeViewRecDirect control is now complete. Subclassing the TreeViewRowsetTree component for indirect recursion The TreeViewRecIndirect component will be almost identical to TreeViewRecDirect. The difference is in the way you retrieve root items and the way you load the descendants of a node. Since the two controls are very similar, the entire class definition of TreeViewRecIndirect is shown below, with the differences highlighted: public class TreeViewRecIndirect : TreeViewRowsetTree { private RTCFOLDER2 m_rstroot; public enum NodeType { Unknown = 0, Folder = 1, File = 2 ; public TreeViewRecIndirect() { InitializeComponent(); m_rstroot = null; public void Init(RepPP.Application app) { RowsetTreeDefNode nodefolder2; if (m_rstroot == null) { m_rstroot = RTCFOLDER2.Create(app); nodefolder2 = m_rstroot.rsfolder2.rowsettreedefnode; m_rstroot.rowsettreedef.buildsqlcommand(); nodefolder2.setselectsqlorderby("order BY FOLDERNAME"); nodefolder2.setselectsqlwhere("where FOLDERID NOT IN (SELECT CHILDFOLDERID " + "FROM DEMO_FOLDER2_SUBFOLDER)"); Empty(); m_rstroot.readfromdb(); FillNodes(m_rstRoot.rsFOLDER2, null); Representing Recursive Relationships Using REP++ TreeView 4

private NodeType FindNodeType(TreeNode node) { NodeType eretval = NodeType.Unknown; TreeNodeRowset noderowset; noderowset = node as TreeNodeRowset; if (noderowset!= null) { if (noderowset.rowset.rowsetdef == m_rstroot.rsfolder2.rowsetdef) { eretval = NodeType.Folder; else { eretval = NodeType.File; return (eretval); public override void OnSetNodeInfo(SetNodeInfoEventArgs e) { RepPP.Toolkit.Window.TreeNodeRowset node; RCFOLDER2 rsfolder2; node = e.node as RepPP.Toolkit.Window.TreeNodeRowset; node.nodetype = (int)findnodetype(node); switch ((NodeType)node.NodeType) { case NodeType.Folder: node.imageindex = 1; node.selectedimageindex = 1; node.setrecursive2level(m_rstroot.rowsettreedef.findnode("folder2_subfold").rowsetdef, "ORDER BY FOLDERNAME", new string[] { "CHILDFOLDERID" ); rsfolder2 = node.rowset as RCFOLDER2; if (rsfolder2.fldchildcount.typedvalue == 0) { node.nodes.clear(); break; case NodeType.File: node.imageindex = 0; node.selectedimageindex = 0; break; base.onsetnodeinfo(e); protected override void Dispose(bool disposing) { if (disposing) { if (m_rstroot!= null) { m_rstroot.dispose(); m_rstroot = null; base.dispose(disposing); The table DEMO_FOLDER2_SUBFOLDER contains the recursive relation between the folders in DEMO_FOLDER2. Because of this: To get the root items, TreeViewRecIndirect loads all the folders that are not specified as child folders in DEMO_FOLDER2_SUBFOLDER. SetRecursive2Level requires a RowsetDef representing DEMO_FOLDER2_SUBFOLDER to get the IDs of the descendant folders. It then uses these IDs to query DEMO_FOLDER2 and populate the descendant nodes. Testing the TreeViewRecDirect and TreeViewRecIndirect components The final step is to test the two recursive TreeView components. Representing Recursive Relationships Using REP++ TreeView 5

1. Add a new Windows form to your project and name it Tester.cs. 2. Add your TreeViewRecDirect and TreeViewRecIndirect components: 3. Add a RepPPInfo component and make sure that you configure your connection properly: 4. Add an ImageList control containing two images and associate it with your recursive TreeViews. Representing Recursive Relationships Using REP++ TreeView 6

5. Modify the class of the new Web form as indicated below, and set it as the startup form in Program.cs: public partial class Tester : Form { private RepPP.Application m_app; public Tester() { InitializeComponent(); m_app = RepPP.Application.CreateFromRes(); m_app.typedinstance.registerall(true); foreach (RepPP.RowsetTreeDef rstdef in m_app.rowsettreedefs) { rstdef.buildsqlcommand(); treeviewrecdirect1.init(m_app); treeviewrecindirect1.init(m_app); Your form should be similar to the following: NOTE: TreeViewRowset uses delay reading so that only the displayed nodes are read from the database. The descendants of a node are read only when the node is expanded. This improves performance by reading only the required nodes and enhances the user experience by decomposing the waiting time per expanded node instead of waiting for all nodes to be loaded at startup. Representing Recursive Relationships Using REP++ TreeView 7

Appendix Create the database 1. Create a new database and name it TreeView. 2. Create the following tables to test the direct recursion: 3. Now, create the following tables to test the indirect recursion: Populate the Database To facilitate the population of the database, we have created a script that automates the process. As a result, you can simply add a new button to any Windows form and have it execute the following code: (butfilltables_click handles the click event of the button that populates the database) private int AddFiles(Random rand, string strfolderid, RCFOLDER2_FILES rsfile, ref int ifileid) { int icount; icount = rand.next(10); for (int i = 0; i < icount; i++) { rsfile.addblankline(); Appendix 8

rsfile.fldfileid.value = ifileid.tostring(); rsfile.fldfilename.value = "File " + ifileid.tostring().padleft(6, '0') + " Folder=" + strfolderid; rsfile.fldchildpos.valueasint = i + 1; ifileid++; return (icount); private int AddFiles(Random rand, string strfolderid, RCFOLDER_FILE rsfile, ref int ifileid) { int icount; icount = rand.next(10); for (int i = 0; i < icount; i++) { rsfile.addblankline(); rsfile.fldfileid.value = ifileid.tostring(); rsfile.fldfilename.value = "File " + ifileid.tostring().padleft(6, '0') + " Folder=" + strfolderid; ifileid++; return (icount); private void CreateFolder(RTCFOLDER2 rstfolder2father, Random rand, ref int ifolderid, ref int ifileid, int ipos) { RTCFOLDER2 rstfolder2; RCFOLDER2 rsfolder2; RCFOLDER2_SUBFOLD rssubfolder; string strfatherfolderid = ""; int ifilecount; int isubcount; if (rstfolder2father!= null) { rssubfolder = rstfolder2father.rsfolder2_subfold; rssubfolder.addblankline(); rssubfolder.fldchildfolderid.valueasint = ifolderid + 1; rssubfolder.fldchildpos.valueasint = ipos; strfatherfolderid = rstfolder2father.rsfolder2.fldfolderid.valueasint.tostring(); using (rsfolder2 = RTCFOLDER2.Create(m_app)) { if (rstfolder2father!= null) { strfatherfolderid = rstfolder2father.rsfolder2.fldfolderid.valueasint.tostring(); isubcount = (rand.next(100) > 75)? rand.next(10) : 0; rsfolder2 = rstfolder2.rsfolder2; ifolderid++; rsfolder2.addblankline(); ifilecount = AddFiles(rand, ifolderid.tostring(), rstfolder2.rsfolder2_files, ref ifileid); rsfolder2.fldfolderid.valueasint = ifolderid; rsfolder2.fldfoldername.value = "Folder " + ifolderid.tostring().padleft(6, '0') + " Father=" + strfatherfolderid; rsfolder2.fldchildcount.valueasint = ifilecount + isubcount; for (int i = 0; i < isubcount; i++) { CreateFolder(rstFolder2, rand, ref ifolderid, ref ifileid, i + 1); rstfolder2.updatetodb(); m_app.dataconnection.commit(); private void CreateFolder(RTCFOLDER rstfolder, Random rand, string strfatherfolderid, ref int ifolderid, ref int ifileid) { RCFOLDER rsfolder; int ifilecount; int isubcount; isubcount = (rand.next(100) > 75)? rand.next(10) : 0; rstfolder.empty(); Appendix 9

rsfolder = rstfolder.rsfolder; ifolderid++; rsfolder.addblankline(); ifilecount = AddFiles(rand, ifolderid.tostring(), rstfolder.rsfolder_file, ref ifileid); rsfolder.fldfolderid.valueasint = ifolderid; rsfolder.fldfoldername.value = "Folder " + ifolderid.tostring().padleft(6, '0') + " Father=" + strfatherfolderid; rsfolder.fldfatherfolderid.value = strfatherfolderid; rsfolder.fldfilecount.valueasint = ifilecount; rsfolder.fldsubfoldercount.valueasint = isubcount; rstfolder.updatetodb(); m_app.dataconnection.commit(); strfatherfolderid = ifolderid.tostring(); for (int i = 0; i < isubcount; i++) { CreateFolder(rstFolder, rand, strfatherfolderid, ref ifolderid, ref ifileid); private void butfilltables_click(object sender, EventArgs e) { RepPP.Connection conn; RCFOLDER rstfolder; int ifoldercount; int ifilecount; Random rand; conn = m_app.dataconnection; using (rstfolder = RTCFOLDER.Create(m_app)) { conn.execute("delete FROM DEMO_FOLDER_FILE"); conn.execute("delete FROM DEMO_FOLDER"); conn.commit(); ifoldercount = 0; ifilecount = 0; rand = new Random(1); m_app.tool.setwaitcursor(true); for (int i = 0; i < 20; i++) { CreateFolder(rstFolder, rand, null, ref ifoldercount, ref ifilecount); m_app.tool.setwaitcursor(false); conn.execute("delete FROM DEMO_FOLDER2_FILES"); conn.execute("delete FROM DEMO_FOLDER2_SUBFOLDER"); conn.execute("delete FROM DEMO_FOLDER2"); conn.commit(); ifoldercount = 0; ifilecount = 0; rand = new Random(1); m_app.tool.setwaitcursor(true); for (int i = 0; i < 20; i++) { CreateFolder(null, rand, ref ifoldercount, ref ifilecount, i + 1); m_app.tool.setwaitcursor(false); MessageBox.Show(iFolderCount.ToString() + " folders and " + ifilecount.tostring() + " files added to the tables"); The code above requires a REP++ Application object. Make sure that you have a REP++ Application object that has been initialized properly before butfilltables_click is called: private RepPP.Application m_app; public YourFormConstructor() { m_app = RepPP.Application.CreateFromRes(); m_app.typedinstance.registerall(true); foreach (RepPP.RowsetTreeDef rstdef in m_app.rowsettreedefs) { rstdef.buildsqlcommand(); Appendix 10

Create a REP++repository 1. Create a REP++connection for your TreeView database. 2. Create a repository and make sure that your repository can be edited using REP++studio. 3. Open your repository in REP++studio and create a new system named TREEVIEW. 4. Using the update wizard, import the definition of your tables. 5. Create the fields for every imported column. 6. Create a new program named TV_PRG. To test the direct recursion 1. In your TREEVIEW system, create the following Rowsets that contain the listed fields: Rowset FOLDER FOLDER_FILE Field FOLDERID FOLDERNAME (Check the User Defined Flag attribute) FATHERFOLDERID SUBFOLDERCOUNT FILECOUNT FILEID FILENAME (Check the User Defined Flag attribute) 2. Create a new RowsetTree named FOLDER that contains the following Rowsets: To test the indirect recursion 1. Create the following Rowsets that contain the listed fields: Rowset FOLDER2 FOLDER2_FILES FOLDER2_SUBFOLD Field FOLDERID FOLDERNAME (Check the User Defined Flag attribute) CHILDCOUNT FILEID FILENAME (Check the User Defined Flag attribute) CHILDPOS CHILDFOLDERID CHILDPOS Appendix 11

2. Create a new RowsetTree named FOLDER2 that contains the following Rowsets: Create a project and generate the TypedInstances 1. In Visual Studio, create a new Rep++Windows Application project named Recursion. 2. In the Project menu, choose Add New Item. 3. In the Add New Item window, select Rep++ Typed Instance. 4. When the wizard starts, make sure that you select the TREEVIEW connection and the TV_PRG program. 5. Generate the typed instances only for the FOLDER and FOLDER2 RowsetTrees. 6. Accept all the remaining default values to have the wizard generate a folder named TypedInstances that contains RTCFOLDER.cs and RTCFOLDER2.cs Appendix 12