Ingres DOT NET Learn

From Ingres Community Wiki

Jump to: navigation, search

This page will provide you with both the latest news on the Ingres .NET Data Provider as well as everything you need to learn about .NET Data Provider and become proficient in using it to build Ingres applications.

Contents

Overview

The Ingres .NET Data Provider offers a series of .NET types to describe the user’s data, .NET provider classes to manipulate the data, and connection pooling to efficiently manage data connections. The design and naming conventions of the Ingres .NET Data Provider’s data types, classes, properties, and methods follow the same pattern as the Microsoft .NET Data Providers. Consequently, developers who are familiar with the Microsoft providers can easily develop or convert existing code from Microsoft databases to Ingres databases.

All Ingres .NET Data Provider modules are written in C#, a managed .NET language with full access to every .NET Framework capability. Even though the data provider is written in C#, any managed language such as VB.NET or J# can use the data provider because of .NET’s language interoperability feature.

The Ingres .NET Data Provider driver enables .NET-enabled applications to access Ingres, Enterprise Access and EDBC databases.


.NET Framework Support

The Ingres 2006 .NET Data Provider is based on the Microsoft .NET 1.1 Framework. The run-time assembly name is Ca.Ingres.Client.

The Ingres 2006 Release 2 .NET Data Provider is based on the Microsoft .NET 2.0 Framework. The run-time assembly name is Ingres.Client. The data provider supports the 2.0, 3.0, and 3.5 .NET Frameworks.

Visual Studio Support

The Ingres .NET Data Provider is integrated with Visual Studio 2005.

Integration with Visual Studio 2005 visual tools allows a programmer to drag-and-drop the data provider design component onto a control. Integration also allows the programmer to use wizards and editors to aid application development.

Initial testing indicates that the Ingres .NET Data Provider integrates with Visual Studio 2008 visual tools.

Platform support

Currently only Windows

Ingres Releases

Ingres 2006 (9.0.4) contains the first release of the .NET Data Provider version 1.1 based on the 1.1 .NET Framework.

Ingres 2006r2 (9.1.0) contains the second release of the .NET Data Provider version 2.0 based on the 2.0 .NET Framework. In addition, this Ingres release ships the 1.1 .NET Data Provider in order for customers to continue to run their .NET applications unmodified as the .NET Data Provider version 2.0 changed the assembly name requiring a small application change. Ingres 2006r2 will be the last Ingres release to contain the .NET Data Provider version 1.1 as future enhancements will be made only to the Ingres .NET Data Provider version 2.0.

Older Ingres versions can also be accessed by the .NET Data Provider but but there will need to be an Ingres 2006 or later client installation containing a Data Access Server (DAS) that the .NET Data Provider will communicate with and then communicate via Ingres Net to the target database.

i.e. .NET Data Provider would communicate with Ingres 2006r2 Data Access Server which in turn would communicate to Ingres 2.6

Architecture

.NET Data Provider Classes

The data provider provides the following classes

Function Description
IngresCommand SQL command or a database procedure that executes against an Ingres or Enterprise Access database
IngresCommandBuilder automatically generates INSERT, DELETE, and UPDATE commands into an IngresDataAdapter object for a simple single-table SELECT query
IngresConnection represents an open connection to an Ingres database
IngresConnectionStringBuilder provides a series of properties and methods to create syntactically correct connection string and to parse and rebuild existing connection strings
IngresDataReader provides a means of reading a forward-only stream of rows from a result-set created by a SELECT query or a row-producing database procedure
IngresDataAdapter represents a set of SQL statements and a database connection that are used to fill a DataSet and, optionally, update the Ingres database
IngresError represents error or warning information returned by the Ingres database
IngresErrorCollection represents a collection of the IngresError objects returned by the Ingres database
IngresException represents the exception that is thrown when error information is returned by the Ingres database
IngresFactory helps generates many of the other Ingres classes in an interoperable data provider model. For each Ingres class that the factory wants to construct, simply call the Ingres constructor for that class and return the object instance.
IngresInfoMessageEventArgs provides the information on warnings from the database to the delegate method that handles the InfoMessage event
IngresInfoMessageEventHandler represents the delegate method that handles the InfoMessage event.
IngresMetaDataCollectionNames presents information on metadata, such as tables, views, and columns
IngresParameter represents a parameter for an IngresCommand for each question mark (?) placeholder in the command and, optionally, its mapping to a DataSet column
IngresParameterCollection represents a collection of all parameters for an IngresCommand object and their mapping to a DataSet object
IngresPermission provides additional information that a user has a security level sufficient to access the Ingres database. At present, the class is not used by the Ingres .NET Data Provider.
IngresRowUpdatedEventArgs provides the information for the RowUpdated event of an IngresDataAdapter
IngresRowUpdatedEventHandler represents a delegate method that handles the RowUpdated event of an IngresDataAdapter
IngresRowUpdatingEventArgs provides the information for the RowUpdating event of an IngresDataAdapter
IngresRowUpdatingEventHandler represents a delegate method that handles the RowUpdating event of an IngresDataAdapter
IngresTransaction represents a local, non-distributed database transaction. Each connection is associated with a transaction. This object allows manual commit or rollback control over the pending local transaction

Specifications

On-Line Documentation

The Ingres .NET Data Provider is documented in the Ingres Connectivity Guide available online at Docs. In addition, the Ingres SQL Reference Guide documents SQL Statements available with the Ingres .NET Data Provider.

Articles

Articles dealing with the Ingres .NET Driver and Integration with other technologies can be found at Articles

Examples

Example code can be found in Code Samples.

Presentations

Here are links to webinars that have been previously given. You can download the presentations and webinar replays. Note that replaying any of the webinars requires that you first install the WebEx ARF media player. Of course, you need Adobe Acrobat Reader for PDF files and InfoZip is a nice open source utility for handling ZIP files.

  • Connecting With Ingres Architecture
  • Ingres with MS .NET and C# (VIP Webinar). Do you develop in the Microsoft .NET Framework with C# programming language? You will learn the capabilities of the new .NET Framework 2.0 data adapter and take a tour of the new C# demonstration program included with Ingres 2006 Release 2. You can download the presentation (pdf) and and replay the DOWNLOAD

Open Source Notes

The packaged Ingres .NET Data Provider installs the data provider binary into the Ingres directory and Global Assembly Cache (GAC), updates the Windows registry, and modifies .NET configuration files for support of all features of the Ingres .NET Data Provider. No other action is needed by application developers in order to reference and execute against the Ingres .NET Data Provider.

For experimentation or to understand the behavior of the code better, the source code for the Ingres .NET Data Provider 2.0 is distributed as part of Ingres Open Source distribution for the Windows platform. The Ingres .NET Data Provider source code is located in the ...\common\dotnet2 directory. The source is organized in a Visual Studio 2005 (VS 2005) project solution. The VS 2005 solution file is dataprovider2.sln in the directory. Both Visual Studio 2005 and the Visual Studio 2005 SDK are needed to compile the data provider. The Open Source developer also needs to define his own Strong Name Key files. More information on the procedure can be found in the ...\common\dotnet2\specials\readme.txt file. The output of the compilation can be used in xcopy type deployment, but it will lack the Visual Studio 2005 design-time integration features that are installed by the standard Ingres install.

To add the compiled data provider assembly to the GAC, run the .NET Framework SDK gacutil.exe utility against the Ingres.Client.dll file to add the Ingres.Client assembly to the GAC. If data provider factory features are desired, run the .NET Framework SDK installutil.exe utility against the Ingres.Install.dll file to add/remove the .NET Data Provider for Ingres DbFactory information in the .NET Framework's machine.config file.

Personal tools
Developing With