検索

記事
· 2025年11月28日 4m read

Connexion de C# à InterSystems IRIS via ODBC

Pour les développeurs d'applications externes, notamment ceux utilisant des technologies comme C#, ODBC (Open Database Connectivity) est une passerelle standardisée essentielle vers toute base de données relationnelle, y compris InterSystems IRIS. Bien qu'InterSystems propose son propre fournisseur ADO.NET natif, le pilote ODBC reste souvent la solution la plus simple pour l'intégration avec les outils et frameworks de bases de données génériques.

Voici un guide pas à pas pour connecter votre application C# à une instance IRIS à l'aide du pilote ODBC, en mettant l'accent sur la chaîne de connexion sans DSN.

Étape 1 : Installation du pilote ODBC InterSystems IRIS

Le pilote ODBC InterSystems est installé par défaut lors de l'installation d'InterSystems IRIS sur une machine Windows.

  • Si IRIS est installé sur la même machine : le pilote est déjà présent.
  • Si IRIS est installé sur un serveur distant : vous devez télécharger et installer le package du pilote client ODBC autonome correspondant à votre système d’exploitation (Windows, Linux ou macOS) et à son architecture (32 bits ou 64 bits) depuis le site web de WRC si vous êtes client, ou en installant les composants clients et en copiant le pilote ODBC.

Une fois installé, vous pouvez vérifier sa présence dans l’outil Administrateur de sources de données ODBC sous Windows (recherchez le pilote InterSystems IRIS ODBC35).

Étape 2 : Définir la chaîne de connexion sans DSN

Au lieu de créer un nom de source de données (DSN) préconfiguré dans l’outil d’administration Windows, nous utiliserons une chaîne de connexion sans DSN. Cette méthode simplifie le déploiement, car votre application contient toutes les informations de connexion nécessaires.

Le format spécifie le nom du pilote et les paramètres du serveur :

Driver={InterSystems IRIS ODBC35};
server=127.0.0.1;
port=1972;
database=USER;
uid=_System

Remarque :

  • Le nom du pilote (InterSystems IRIS ODBC35 ou parfois InterSystems ODBC) doit correspondre exactement au nom enregistré dans votre administrateur de sources de données ODBC local.
  • Le port est celui du serveur IRIS (souvent 1972).
  • La base de données correspond à l’espace de noms cible dans InterSystems IRIS (par exemple, USER ou l’espace de noms personnalisé de votre application).
  • L’UID par défaut est _System et le mot de passe est SYS. Modifiez toujours ces valeurs par défaut en environnement de production.

Étape 3 : Implémenter la connexion en C#

Dans votre projet C#, vous devrez référencer l’espace de noms System.Data.Odbc pour utiliser le fournisseur ODBC générique .NET.

Voici un exemple minimal en C# qui établit une connexion, exécute une requête simple sur une table par défaut et affiche le résultat.

using System.Data;
using System.Data.Odbc;

public class IrisOdbcExample
{
    public static void Main()
    {
        // 1. Define the DSN-less connection string
        string connectionString =
            "DRIVER={InterSystems IRIS ODBC35};" +
            "Server=127.0.0.1;Port=1972;Database=USER;" +
            "UID=_System;PWD=SYS;";

        // 2. Define the SQL Query (Example: querying the default Sample.Person table)
        string sql = "SELECT ID, Name FROM Sample.Person WHERE ID < 5";

        using (OdbcConnection connection = new OdbcConnection(connectionString))
        {
            try
            {
                connection.Open();
                Console.WriteLine("Connection successful!");

                using (OdbcCommand command = new OdbcCommand(sql, connection))
                using (OdbcDataReader reader = command.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        Console.WriteLine($"ID: {reader["ID"]}, Name: {reader["Name"]}");
                    }
                }
            }
            catch (OdbcException ex)
            {
                // 3. Handle specific ODBC errors (e.g., wrong password, port blocked)
                Console.WriteLine($"ODBC Error: {ex.Message}");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"General Error: {ex.Message}");
            }
            // The connection is automatically closed at
            // the end of the Using block.
        }
    }
}

Étapes suivantes

Cette approche sans DSN offre une grande flexibilité et évite de surcharger la configuration côté client. Pour les applications C# hautes performances, vous pouvez envisager le fournisseur ADO.NET natif d'InterSystems. Toutefois, pour une intégration rapide et une compatibilité optimale avec les outils, une connexion ODBC reste une solution fiable.

❗ N'oubliez pas d'utiliser systématiquement des requêtes paramétrées en production afin de prévenir les vulnérabilités liées aux injections SQL.

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
質問
· 2025年11月27日

Error with Coud Storage Adapters - Trying to access AWS S3 buckets

I am using IRIS for Windows (x86-64) 2022.1 (Build 209) Tue May 31 2022 12:27:55 EDT [Health:3.5.0]. I created Interoperability Production with a Service to read file from S3 bucket and an Operation to write files to a different S3 bucket. I specified AWS  ProviderCredentialsFile.

I see "Terminating Job 7096 / 'From S3 Bucket' with Status = ERROR #5023: Remote Gateway Error: Connection cannot be established, %QuitTask=

Do I need anything like Python libraries or AWS CLI to make this work?

2 Comments
ディスカッション (2)2
続けるにはログインするか新規登録を行ってください
お知らせ
· 2025年11月27日

New Demo Challenge on Global Masters: Show Interoperability UI 2025.3 in action!

New contest — new chance to earn points on Global Masters!

7,000 points for each walkthrough video submission 🧐

What this is about:
We're looking for feedback on the Interoperability UI in the latest release, 2025.3.
You can check what's new in this recent announcement by @Aya Heshmat 

How to take part: 

Build and record a short (5–10 minute) walkthrough demo using the new Interoperability UI in InterSystems IRIS or IRIS for Health 2025.3 to create a working production.  

 

In your video, walk through your setup and share audible feedback about your experience.

Then, submit both the recording and the production export file. Example scenarios include transforming HL7 to FHIR, processing IoT data, triggering EHR notifications, or routing financial transactions. The goal is to showcase how you use and experience the new UI in action.  

Submission requirements:

  1. Submit a video recording (5–10 minutes) ✓ Show yourself navigating the new Interoperability UI. ✓ Include audible feedback throughout — what you find intuitive, what could improve, etc. ✓ Walk us through your thought process and configuration choices.
  2. Send the production export file ✓ Include all components and settings you created and send to ux@intersystems.com with a title "Feedback on New Interoperability UI 2025.3

Please use the newest community edition of IRIS or IRIS for Health (2025.3) or the latest-preview docker image. 

How to make a recording:

To help you create a clear and useful demo, please follow these instructions:

1. Read this Recording guide to prepare;

2. Use this link to record your walkthrough using Riverside platform (If the page loads as a black screen, simply refresh it a few times).

It's very easy to make a recording using this link — it will be sent to us automatically, so there's no need to upload it anywhere😊

Prizes:

  • All participants: 7,000 points for each verified video submitted.
  • 1st place winner: an additional 5,000 points for one winning video, selected by an InterSystems expert based on the quality of the feedback.

Deadline to submit your video: December 12.

We would be grateful for your participation.
 

1 Comment
ディスカッション (1)1
続けるにはログインするか新規登録を行ってください
記事
· 2025年11月27日 3m read

Celebrating a Curious Mind of the Developer Community

Every thriving technical community has individuals whose curiosity, perseverance, and generosity help shape its collective knowledge. In the InterSystems Developer Community, one such contributor is @Scott Roth, who has been an inspiring presence for nearly a decade.

👏 Let’s take a closer look at Scott's remarkable journey and his impact on the InterSystems ecosystem.

Scott's journey began in 2015, with the first steps into InterSystems technologies, and soon after, in 2016, into the Developer Community itself. Since then, years of hands-on experience and continuous learning have unfolded, marked by major milestones like the transformation from Ensemble to HealthShare Health Connect. This shift not only brought greater scalability and reliability but also opened a world of new capabilities to explore.

One of the most memorable chapters was the migration from eGate to Ensemblea project that unlocked deep technical growth. From building interfaces with Caché ObjectScript, to crafting stored procedure calls with EnsLib.SQL.OutboundAdapter, to mastering ZAUTHENTICATE for LDAP authentication, and finally creating a secure environment using Apache Web Server, certificates, and model LDAP authentication. Each step satisfied an ever-growing curiosity and improved the efficiency of the entire environment. It was during that formative eGate-to-Ensemble migration that the Developer Community became an essential companion, a place to explore, connect, and learn.

But progress rarely comes without roadblocks. Many challenges stemmed from limited internal knowledge or scarce online resources. The lesson learned? Refresh the mind. Step back. Return with clarity. Problem-solving is as much about pacing as it is about persistence.

Over time, as more members joined, the Developer Community evolved into a richer collective of shared expertise. And with that growth came a new role: transitioning from mainly asking questions to confidently helping newcomers who face the same obstacles once encountered at the beginning. Among the most rewarding moments have been opportunities to give back: responding to posts and guiding others through complexities that once seemed overwhelming. These moments highlight the true spirit of the Community - collaboration, mentorship, and empowerment.

The message to newcomers is encouraging and straightforward:

While there is a lot of knowledge available, don’t be afraid to ask obvious questions that may sound ridiculous. While the answer might be already within the Developer Community, it may not be recognizable in the way you phrase your question. Don’t be afraid to post.

Looking ahead, there is excitement around diving deeper into FHIR capabilities within Health Connect, to enhance HL7 messaging and expand interoperability skills.

Outside of work, Scott's life is grounded in family, supporting his spouse’s business, enjoying time with dogs, and gaming when time allows. While separating work from personal life isn’t always easy, these passions provide balance and perspective.

This story is a testament to what curiosity, resilience, and a willingness to share can bring to a community. It celebrates a contributor who embodies the very best of the Developer Community - continually learning, constantly helping, and forever lifting others along the way.

🙏 Join us in celebrating @Scott Roth for his dedication, skill, and contributions to the Developer Community!

6 Comments
ディスカッション (6)4
続けるにはログインするか新規登録を行ってください
お知らせ
· 2025年11月27日

[Vídeo] Inteligência Artificial Generativa no InterSystems Data Studio

Olá Desenvolvedores,

Confira o novo vídeo no canal do YouTube da InterSystems Developers.

⏯ Inteligência Artificial Generativa no InterSystems Data Studio @ READY 2025

Descubra como o InterSystems Data Studio (IDS) ajuda as organizações a unificar dados de diversas fontes, incluindo bancos de dados relacionais, arquivos, PDFs, Salesforce, SAP e muito mais, para dar suporte a relatórios, análises e tomada de decisões operacionais. Agora, com a adição de um Assistente integrado com inteligência artificial generativa, usuários de negócios, como executivos, gerentes, analistas e profissionais clínicos, podem fazer perguntas em linguagem natural para explorar dados, descobrir insights e automatizar tarefas. Equipes em toda a organização podem até mesmo implantar Assistentes personalizados com nomes, personalidades e conhecimento específico da área. Todas as interações são regidas por controles de acesso robustos, garantindo que os usuários acessem apenas os dados que estão autorizados a visualizar, permitindo uma tomada de decisão baseada em dados segura, eficaz e fácil de usar em todos os níveis.

Apresentadores:
🗣 @Amir Samary, Director, Solution Architecture at InterSystems
🗣  @Phillip Booth, Lead Solutions Developer at InterSystems

Quer aprender as melhores práticas? Assista a este vídeo e inscreva-se para saber mais!

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください