The above trademarks are property of the specified companies in the United States, other countries, or both. All other products or services mentioned in this document may be covered by the trademarks, service marks, or product names as designated by the companies who own or market them. License agreement This software and the associated documentation are proprietary and confidential to Rocket Software, Inc., are furnished under license, and may ...
Restricted rights notice for license to the U.S. Government: Use, reproduction, or disclosure is subject to restrictions as stated in the “Rights in Technical Data-G eneral” clause (alternate III), in FAR sect ion 52.222-14. All title and ownership in this computer software remain with Rocket Software, Inc. Note This product may contain encryption technology. Many countries prohibit or restrict the use, import, or export of encryption technologies, and current use, import, and export regulations should be followed when exporting this product. Please be aware: of the product(s) documented herein may or brandingAny images or indications reflecting ownership or may not reflect the current legal ownership of the intellectual property rights associ ated with such product(s). All right and title to the product(s) documented herein belong solely to Ro cket Software, Inc. and its subsidiaries, notwithstanding any notices (including screen captures) or any other indications to the contrary. Contact information Rocket Software 275 Grove Street Suite 3-410 Newton, MA 02466-2272 USA Tel: (617) 614-4321 Fax: (617) 630-7100 Web Site:�m.eoctwartsofockweww.r
U2.NET Binding Objects Tutorial iii
Table of Contents Unit 1 1Product Overview 1Feature Overview ........................................................................................... 2The U2.NET Suite....................................................................................... 3Software Requirements.............................................................................. 3Unit 2 4Binding Objects Tutorial 4Building .NET Applications with U2.NET ......................................................... 5Unit 3 6Creating Profiles 6Creating a Server Profile ............................................................................ 7Creating a Connection ............................................................................... 9Installing the Server Components ............................................................ 10Installing the U2NETDEMO account.......................................................... 11Creating an Account Profile ..................................................................... 13Unit 4 14The PrimaryDataSource Control 14Creating a Windows Form Application .......................................................... 15Opening a New Project in Visual Studio.................................................... 15Setting the Form Properties ..................................................................... 16Adding the PrimaryDataSource ................................................................ 17Building the Application .......................................................................... 21The Solution File .......................................................................................... 23Unit 5 24Adding New Features 24Adding Controls .......................................................................................... 25iv U2.NET Binding Objects Tutorial
Building the Application .......................................................................... 28The Solution File .......................................................................................... 29Unit 6 30Secondary Data Source Definitions 30Adding a CheckedListBox............................................................................. 31Setting the Secondary Data Source Definition ............................................... 33Building the Application .......................................................................... 35Adding a New Customer .............................................................................. 37The Solution File .......................................................................................... 39Unit 7 40Nested Data Controls 40Creating Nested Data Controls ..................................................................... 41Building the frmMain Form ...................................................................... 41Building the frmOrderMaint Form ............................................................ 44Adding Grid Controls............................................................................... 46Building the Application .......................................................................... 49The Solution File .......................................................................................... 51Unit 8 52Linked Primary Data Sources 52Linking the PrimaryDataSource..................................................................... 53Setting the SELECT Clause ............................................................................ 56Building the Application .......................................................................... 57The Solution File .......................................................................................... 59Further Reading 60
U2.NET Binding Objects Tutorial v
Unit 1
Product Overview
This unit outlines the components of UniData and UniVerse Add-ins for Visual Studio (U2.NET) and also summarizes the contents of this guide. Note: Unless otherwise stated, all examples in this guide use Visual Basic.Net syntax.
1 U2.NET Binding Objects Tutorial
Feature Overview Binding Objects provides advanced data binding capabilities to the .NET developer. The Binding Objects architecture has been designed with both performance and flexibility in mind. It provides seamless integration with the .NET environment, and provides a powerful tool for enabling developers to harness the full power of both their U2 system and the .NET platform. Binding Objects also integrates Microsoft's Visual Studio.NET product. The product's key features are as follows:
•Multivalue-aware data binding methodology, which allows full access to all three dimensions of item data. •Multivalued hierarchy support, which allows controls to be connected and interrelated based on U2 data nesting within a single item. •Full integration with U2.NET's fetch-on-demand technology. •Support for pessimistic and optimistic locking.
•advanced RAD features to boost developer productivity.Many
U2.NET Binding Objects Tutorial 2
The U2.NET Suite Binding Objects is one of three components within the U2.NET product suite: •Core Objects: Object-oriented native .NET access to U2 data servers. •Binding Objects: High-performance data binding technology that enables standard .NET controls to become fully U2-aware. Binding Objects links with Core Objects to provide its functionality. •Adapter Objects: Complete implementation of an ADO.NET managed data provider for U2 data servers, offering a standardized interface to access multivalued data in U2 data stores.
Software Requirements The prerequisites for U2.NET 1.2.1 are as follows: •UniData 7.1(or later) or UniVerse 10.2 (or later) •Windows XP or Windows 2003 SP2 •Framework 3.5 (and .NET Framework 2.0, if developing and deploying Visual.NET Studio 2005 applications) •U2.NET Developer only oMicrosoft Visual Studio 2005 or Visual Studio 2008 oASP.NET AJAX Extensions 1.0 (for VS 2005 only)
3 U2.NET Binding Objects Tutorial
Unit 2
Binding Objects Tutorial
This unit briefly describes the use of the Binding Objects component when building a .NET application in Visual Studio.
U2.NET Binding Objects Tutorial 4
Building .NET Applications with U2.NET
U2.NET uses data binding to reduce the programming burden by allowing developers to hook into frequently required data-oriented interface features and capabilities. This is done by setting control properties at design time or at run time, as opposed to writing code. Implemented properly, it can provide significant savings in development time. U2.NET's Binding Objects module provides data binding technology to help you build .NET applications quickly. Binding Objects provides RAD capabilities and allows the full flexibility of the multivalued data model to be used within an application. The Binding Objects components leverage the data that can be entered into U2.NET's extended dictionary definitions. The units in this tutorial are designed to walk you through the steps involved in creating a .NET application using U2.NET Binding Objects. Each unit covers a task and builds upon the last, so it is important to work through the previous unit. After completing each of the units, you will have created a copy of the Order Maintenance application found in the U2.NET Binding Objects sample application. This tutorial assumes that you have already installed U2.NET Developer on your workstation, and that the U2.NET server components and the U2NETDEMO account have been downloaded and configured from the U2.NET Data Manager tool to your U2 data server. Ifyou are not sure how to do this, refer to the U2.NET Getting Started Guide or the U2.NET User Guide. In addition, you will need Visual Studio 2005 or Visual Studio 2008 installed on your workstation. Note: U2.NET ships with several third-party controls that provide enhanced funtionality above standard Windows forms controls. These are available to you for a 30-day evaluation period. After that, you will need to purchase licenses for these third-party controls directly from their respective companies.