Question
· May 27

Connecting to IRIS Database Using py.odbc

Hi everybody,
I am trying to connect with an IRIS database where to retrieve data and import them to SQL server but the access gets denied.
I would appreciate your help,
Thank you,
Jeb

I have following information:

Data Source Name --> I use it as the server name

Host(IP Address)

Port

Namespace --> I could use it in my script

import pyodbc

connection_string = (
"DRIVER={InterSystems IRIS ODBC35};"
"SERVER=______;"
"PORT=______;"
"DATABASE=________;"
"TrustServerCertificate=yes;"
)

try:
conn = pyodbc.connect(connection_string)
print("Connection successful")
except pyodbc.Error as ex:
sqlstate = ex.args[1]
print(f"Connection failed: {sqlstate}")

---- Access Denied (417)

Product version: IRIS 2022.1
Discussion (5)2
Log in or sign up to continue