Ingres Community Forums Login Register Ingres.com  

Ingres Community Wiki

Navigation
Learn About
Developing With
Ingres Talk
Information
Toolbox

DOT NET Examples

From Ingres Community Wiki

Jump to: navigation, search

The following code samples demonstrate use of the Ingres .NET Data Provider.

Contents

Connections

.NET Program Examples Description
.NET - Connect to a database as current user This simple example shows how to connect to Ingres using the Ingres .NET Data Provider. The connection string defaults to Port=II7 and to the current user credentials.
.NET Provider for ODBC - Insert Strings into Varchar The String data type in .NET applications is Unicode based (UTF-16 encoding). This .NET Data Provider for ODBC (ODBC.NET) C# sample program demonstrates how to INSERT Strings into an Ingres varchar datatype.

Executing Queries

.NET Program Examples Description
.NET - DataReader This simple example shows how to access a stream of Ingres data using the IngresDataReader class of the Ingres .NET Data Provider.
.NET - EnlistTransaction and TransactionScope IngresConnection's EnlistTransaction( ) method enables the Ingres .NET Data Provider to interface to an explicit transaction programming model using the .NET Transaction class or to an implicit transaction programming model using the .NET TransactionScope class. The example demonstrates a coordinated commit between two databases within a distributed transaction. This support is in Ingres 9.3 and later.
Using the new Ingres 10 Boolean Data Type with .NET A sample C# program that displays usage of the new Ingres 10 Boolean Data Type with .NET.

DataSet

.NET Program Examples Description
.NET - DataSet This simple example shows how to access Ingres data and fill a DataSet using the IngresDataAdapter class of the Ingres .NET Data Provider.

IngresStoredProcedures

.NET Program Examples Description
.NET - IngresStoredProcedures This step-by-step article uses VB.NET and the IngresDataReader object to retrieve data from an Ingres stored procedure.
.NET - IngresStoredProcedures - Parameters This C# code fragment calls an Ingres stored procedure with Input and InputOutput parameters.
.NET - IngresStoredProcedures - ReturnValue This C# code fragment calls an Ingres stored procedure with ReturnValue, Input, and InputOutput parameters.
.NET - IngresStoredProcedures - Global Session Temporary Table This C# code fragment calls an Ingres stored procedure passing a session temporary table. The code then retrieves data from the table to verify that the stored procedure executed successfully.
.NET - IngresStoredProcedures - InfoMessageEventHandler This C# program accesses the MESSAGE data returned by an Ingres stored procedure. The data provider uses the IngresInfoMessageEventHandler to access the returned string and code.
Personal tools
© 2009 Ingres Corporation. All Rights Reserved