George James Software

Developer Tools

Connecting to InterSystems IRIS in VS Code using SQLTools

SQLTools is a Visual Studio Code (VS Code) Extension with over 3.5 million downloads that provides connections to many of the most used databases, including InterSystems IRIS, using drivers.

For developers new to VS Code, or those already familiar with it but are looking to streamline their connections to InterSystems IRIS, this tutorial will take you through installing the SQLTools extensions and the InterSystems IRIS drive. It then guides you on how to establish a connection to your instance of InterSystems IRIS and run a query.

You will need: VS Code installed on your system and access to an instance of InterSystems IRIS.

Installing the SQLTools extension and the InterSystems IRIS driver

  1. Launch VS Code.
  2. Navigate to the Extensions view on the Activity Bar or by pressing Ctrl+Shift+X.
  3. In the search bar, type “SQLTools” and press Enter.
  4. Locate the SQLTools extension from the search results and click on the “Install” button.
  5. Wait for the installation to complete, then close the tab. Take note of the new SQLTools icon in your Activity Bar.
  6. In the Extension search bar, type “SQLTools IRIS” and press Enter.
  7. Find the SQLTools InterSystems IRIS extension from the search results and click on the “Install” button.
  8. Once successfully installed, close the tab.

Connecting to InterSystems IRIS

  1. Go to the SQLTools icon on the Activity Bar.
  2. Click “Add New Connection” and select the “InterSystems IRIS” driver.
  3. Enter a name for your connection.
  4. Fill in the connection details and optionally configure additional settings based on your environment.
  5. Test your connection using the “Test Connection” button.
  6. Once your connection has been successfully tested, click “Save Connection” to create the connection.

Running a Query

  1. Navigate to the SQLTools icon on the activity bar, where you will see your connections.
  2. Right-click on the connection you want to make and select “Connect” from the context menu.
  3. Once connected, write a simple query.
  4. Click “Run on active connection”.
  5. SQLTools will then generate results, displayed in the right panel.
  6. To explore the tables in your database drill down on your connection in the Primary Sidebar.
  7. Select “Show Table Record” (Ctrl+E Ctrl+S) or click the magnifying glass icon.
  8. Click “Open” and “Open results as JSON”.