I am a volunteer at a nonprofit that is attempting to connect to a product that uses InterSystems Cache (Clinisys LIMS). I have not used this database before, but I have used many others (MS-SQL, Oracle, etc.). I am hoping IRIS is compatible enough with Cache for this project.
I downloaded IRIS. I learned about Terminal [IRIS]. Using it I was able to create a new table, insert data, and retrieve it. I also used the Management Portal to query the new table. It also returned the data.
Next I attempted to connect with Visual Studio (MS VS 2022 Profesional). I downloaded the InterSystems.Data.IRISClient through NuGet. It was published 1/22/2025. It has only 21 downloads. (Quite strange!)
I am using this C# code:
var IRISConnect = new IRISADOConnection()
IRISConnect.ConnectionString = cs.CreateCs()
IRISConnect.Open()
I have tried many connection strings. This one seems the most promising:
var IRISConnect = new IRISADOConnection(host: "localhost", port: "1972", nsp: "USER", username: "username1234", password: "abcd1234")
IRISConnect.Open()
String queryString = "SELECT * FROM Test.Employee"
IRISCommand cmd4 = new IRISCommand(queryString, IRISConnect)
IRISDataReader Reader = cmd4.ExecuteReader()
while (Reader.Read())
Console.WriteLine(Reader.GetValue(0).ToString())
Reader.Close()
cmd4.Dispose()
IRISConnect.Close()
The error occurs on the line, IRISConnect.Open(). It read, "IRIS Security Error".
I am able to login to both the terminal and management portal with the username and password. The namespace "USER" appears in the management portal, so I believe it is okay as well. The port is listed under the "iris all" terminal command.
.png)
The SuperUser roles are "%All" in the Management Portal: System > Security Management > Users > Edit User - (security settings): Roles tab: Role Name.
The "Last Reason for Failing to Login" is "ERROR #5002: ObjectScript error: <READ>Logon+118^%SYS.DBSRV.1".
How can I login to IRIS with .NET?
References:
1) https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...
2) https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...
3) https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...