docs.intersystems.com
Home  /  Application Development: Language Bindings and Gateways  /  Using .NET and the ADO.NET Managed Provider with InterSystems IRIS  /  Introduction


Using .NET and the ADO.NET Managed Provider with InterSystems IRIS
Introduction
[Back]  [Next] 
InterSystems: The power behind what matters   
Search:  


This book describes how to use the SqlClient .NET assembly, which provides two different but complementary ways to access InterSystems IRIS™ from a .NET application:
The SqlClient assembly is implemented using .NET managed code throughout, making it easy to deploy within a .NET environment. It is thread-safe and can be used within multithreaded .NET applications.
Installation and Configuration
This section provides specifies requirements and provides instructions for installing InterSystems IRIS and configuring Visual Studio.
Requirements
InterSystems IRIS is not required on computers that run your InterSystems IRIS .NET client applications, but they must have a TCP/IP connection to the InterSystems IRIS Server and must be running a supported version of the .NET Framework.
Installation
The SqlClient assembly (InterSystems.Data.SqlClient.dll) is installed along with the rest of InterSystems IRIS, and requires no special preparation.
To use the SqlClient assembly in a .NET project, you must add a reference to the assembly, and add the corresponding Using statements to your code (as described in the following section, Configuring Visual Studio).
There is a separate version of InterSystems.Data.SqlClient.dll for each supported version of .NET. These files are located in the following subdirectories of <iris-install-dir>\dev\dotnet\bin:
See InterSystems IRIS Installation Directory in the Installation Guide for the location of <iris-install-dir> on your system.
All InterSystems IRIS assemblies for .NET are installed to the .NET GAC (Global Assembly Cache) when InterSystems IRIS is installed.
Configuring Visual Studio
This chapter describes how to set up a Visual Studio project using the SqlClient assembly, and how to add the InterSystems IRIS Object Binding Wizard to Visual Studio. The following topics are covered:
Configuring a Visual Studio Project
To add a SqlClient assembly reference to a project:
  1. From the Visual Studio main menu, select Project > Add Reference
  2. In the Add Reference window, click on Browse...
  3. Browse to the subdirectory of <iris-install-dir>\dev\dotnet\bin that contains the assembly for the version of .NET used in your project (see Installation), select InterSystems.Data.SqlClient.dll, and click OK.
  4. In the Visual Studio Solution Explorer, the InterSystems.Data.SqlClient assembly should now be listed under References.
Add Using Statements to the Application
Add Using statements for the two main namespaces in the InterSystems.Data.SqlClient.dll assembly before the beginning of your application's namespace. InterSystems.Data.SqlClient provides code in the namespace InterSystems.Data.CacheClient, so this namespace must be referenced in the using statement.
  using InterSystems.Data.SqlClient;

  namespace DotNetSample {
    ...
  }
Both the SqlClient and CacheTypes namespaces are included in the InterSystems.Data.SqlClient.dll assembly.
The InterSystems IRIS .NET Help File
The InterSystems IRIS .NET help file provides the most current and detailed documentation for both object and relational APIs. This file is named CacheProvider.chm, and it is available as a stand-alone help file in <iris-install-dir>\dev\dotnet\help.