
Front cover Integrating DB2 Universal Database for iSeries with Microsoftcrosoft ADO .NETET Discover the power of ADO .NET Data Providers for the iSeries Learn best practices, performance tuning, and migrating from OLE DB Master iSeries .NET programming Hernando Bedoya Carlos Carminati Lorie DuBois Jarek Miszczyk Ajit Mungale ibm.com/redbooks International Technical Support Organization Integrating DB2 Universal Database for iSeries with Microsoft ADO .NET April 2005 SG24-6440-00 Note: Before using this information and the product it supports, read the information in “Notices” on page vii. First Edition (April 2005) This edition applies to Version 5, Release 3, Modification 0 of OS/400 (product number 5722-SS1). © Copyright International Business Machines Corporation 2005. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Notices . vii Trademarks . viii Preface . ix The team that wrote this redbook. ix Become a published author . .x Comments welcome. xi Part 1. Background . 1 Chapter 1. Introduction to DB2 UDB for iSeries. 3 1.1 An integrated relational database . 4 1.2 DB2 UDB for iSeries: an overview . 4 1.2.1 DB2 UDB for iSeries basics . 5 1.3 Connectivity options to DB2 UDB for iSeries . 6 1.3.1 Multiplatform connectivity . 6 1.3.2 Windows platform connectivity . 7 1.4 DB2 UDB for iSeries sample schema . 8 Chapter 2. Introduction to the Microsoft .NET framework. 11 2.1 Description of .NET . 12 2.1.1 Architecture. 12 2.1.2 Platform support . 13 2.2 Common Language Runtime (CLR) . 14 2.2.1 Runtime execution environment . 14 2.3 Class libraries . 15 Chapter 3. ADO .NET object hierarchy . 17 3.1 Overview of ADO .NET . 18 3.1.1 Connection . 19 3.1.2 Command . 20 3.1.3 DataReader. 21 3.1.4 DataAdapter . 22 3.1.5 DataSet . 22 3.2 Connected mode. 23 3.3 Disconnected mode . 25 Part 2. Providers . 31 Chapter 4. IBM DB2 UDB for iSeries .NET provider . 33 4.1 Introduction . 34 4.2 IBM.Data.DB2.iSeries architecture . 34 4.2.1 ADO.NET interfaces . 34 4.2.2 Host server jobs . 35 4.2.3 Supported features . 36 4.2.4 Unsupported features . 38 4.3 Before we begin . 39 4.3.1 PC setup . 39 4.3.2 Host setup. 40 4.4 Getting started. 41 © Copyright IBM Corp. 2005. All rights reserved. iii 4.4.1 Displaying the technical reference . 41 4.4.2 Starting Visual Studio .NET . 42 4.4.3 Adding an assembly reference to the provider . 43 4.4.4 Adding a namespace directive . 44 4.5 Provider basics . 45 4.5.1 A simple connection example . 45 4.5.2 iDB2Connection and ConnectionString properties . 48 4.5.3 iDB2Command properties and methods. 65 4.5.4 Using parameters in your SQL statements . 74 4.5.5 Calling stored procedures . 79 4.5.6 Choosing your execute method . 86 4.5.7 Provider data types . 87 4.5.8 Handling exceptions . 102 4.6 Common tasks . 107 4.6.1 A DataReader example. 107 4.6.2 A simple DataAdapter with CommandBuilder example . 110 4.6.3 Using transactions . 116 4.6.4 Calling a program by wrapping it in a stored procedure . 120 4.6.5 Calling a program or CL command using QCMDEXC . 120 4.6.6 Choosing between iDB2DataReader and iDB2DataAdapter . 127 4.7 Advanced topics . 129 4.7.1 Internationalization and support for multiple languages . 129 4.7.2 Using large objects (LOBs) . 132 4.7.3 Updating DataSets . 136 4.7.4 Using iDB2CommandBuilder . 139 4.7.5 Using DataLinks . 141 4.7.6 Connection pooling . ..
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages288 Page
-
File Size-