Chapter 6. .NET Programming

Knowledge of ADO.NET object model


In recent years, Microsoft® has been promoting a new software development platform for Windows®, known as the .NET Framework. The .NET Framework is Microsoft's replacement for Component Object Model (COM) technology. The following points highlight the key .NET Framework features:

  • You can code .NET applications in over forty different programming languages. The most popular languages for .NET development are C# and Visual Basic .NET.

  • The .NET Framework class library provides the building blocks with which you build .NET applications. This class library is language agnostic and provides interfaces to operating system and application services.

  • Your .NET application (regardless of language) compiles into Intermediate Language (IL), a type of bytecode.

  • The Common Language Runtime (CLR) is the heart of the .NET Framework, compiling the IL code on the fly, and then running it. In running the compiled IL code, the CLR activates objects, verifies their security clearance, allocates their memory, executes them, and cleans up their memory once execution is finished.

Through these features, the .NET Framework facilitates a wide variety of application implementations (for instance, Windows forms, web forms, and web services), rapid application development, and secure application deployment. COM and COM+ proved to be inadequate or cumbersome for all the aforementioned features.

The .NET Framework provides extensive data access support through ADO.NET. ADO.NET supports both connected and disconnected access. The key component of disconnected data access in ADO.NET is the DataSet class, instances of which act as a database cache that resides in your application's memory.

For both connected and disconnected access, your applications use databases through what's known as a data provider. Various database products include their own .NET data providers for, including DB2® for Windows.

A .NET data provider features implementations of the following basic classes:

  • Connection: Establishes and manages a database connection.

  • Command: Executes an SQL statement against a database.

  • DataReader: Reads and returns result set data from a database.

  • DataAdapter: Links a DataSet instance to a database. Through a DataAdapter instance, the DataSet can read and write database table data.

Microsoft provides two data providers, the OLE DB .NET Data Provider and ODBC .NET Data Provider. The OLE DB .NET Data Provider is a bridge provider that feeds ADO.NET requests to the IBM OLE DB Provider (by way of the COM interop module). ODBC .NET Data Provider is a bridge provider that feeds ADO.NET requests to the IBM ODBC Driver. These .NET data provider are NOT recommended for access to DB2 family databases. The IBM Data Server Provider for .NET is a high performance, managed ADO.NET data provider. This is the recommended .NET data provider for use with DB2 family databases. ADO.NET database access using the IBM Data Server Provider for .NET has fewer restrictions, and provides significantly better performance than the OLE DB and ODBC .NET bridge providers.

IBM Data Server Provider for .NET

The IBM® Data Server Provider for .NET extends DB2® data server support for the ADO.NET interface. The IBM Data Server Provider for .NET delivers high-performing, secure access to IBM data servers.

The IBM Data Server Provider for .NET allows your .NET applications to access the following database management systems:

  • DB2 Version 9 (or later) for Linux®, UNIX®, and Windows®

  • DB2® Universal Database™ Version 8.2 for Windows, UNIX, and Linux

  • DB2 for z/OS® and OS/390® Version 8 (and Version 9), through DB2® Connect™

  • DB2 for i5/OS® Version 5 Release 3, through DB2 Connect

  • IBM Informix® Dynamic Server, Version 11.1 (and Version 11.5)

  • IBM UniData®, Version 7.1 or later

  • IBM UniVerse®, Version 10.2 or later

To develop and run applications that use Data Server Provider for .NET you need the .NET Framework.

In addition to the IBM Data Server Provider for .NET, the IBM Database Development Add-Ins enable you to quickly and easily develop .NET applications for IBM data servers using Microsoft® Visual Studio. You can also use the Add-Ins to create database objects such as indexes and tables, and develop server-side objects, such as stored procedures and user-defined functions.

Professional hosting     Belorussian informational portal         Free SCWCD 1.4 Study Guide     Free SCDJWS 1.4 Study Guide     SCDJWS 1.4 Quiz     Free IBM Certified Associate Developer Study Guide     IBM Test 000-287. Enterprise Application Development with IBM WebSphere Studio, V5.0 Study Guide     SCDJWS 5.0 Quiz