VB.NET에서 InterSystems IRIS Platform 데이터베이스에 액세스하는 방법
(결론에서 말하면 이전에 이 절에서 소개한 VB.NET에 의한 Cache'의 접속과 거의 같습니다.)
1.InterSystems IRIS Platform 설치(디스크 사용)
2. 오른쪽 하단의 아이콘 [IR]에서 Studio를 시작

3. 테이블이 되는 클래스를 작성한다(신규→클래스의 작성으로부터.여기에서는 네임스페이스 "USER"안에, MercForNLP라고 하는 클래스를 작성하고 있다.)

소스 코드는 다음과 같습니다. contentFull 뒤에 있는 MAXLAN이 없으면 기본 문자열은 50자 정도입니다.
MercForNLP
Class User.MercForNLP Extends (%Persistent, %Library.Populate)
{
Property diseaseName As %String;
Property medicalDivision As %String;
Property dataType As %String;
Property contentFull As %String(MAXLEN = 100000);
4.VB.NET 준비
새 프로젝트를 만들고 (여기서 양식 응용 프로그램 만들기) 프로젝트 → 참조 추가
C:\InterSystems\IRIS\dev\dotnet\bin\4.5\InterSystems.Data.IRISClient.dll
C:\InterSystems\IRIS\dev\dotnet\bin\4.5\InterSystems.Data.GateWay64.dll
추가

버튼을 하나 만들고 IRIS에 연결 코드를 작성합니다. VB.NET내 코드의 기술은 다음과 같다. port=51773임을 유의한다. 여기서는 SQL 문을 사용하여 ID = 1의 데이터를 Reader.Read ()로 읽습니다. 또, 이것이 클라우드에 있는 경우(IRIS Platform에서는 유저 등록으로 클라우드상의 IRIS를 이용할 수 있게 됩니다)에서도, 어드레싱을 바꾸는 것만이므로, 조작법은 공통입니다.
IrisConnectionTest.vb
Imports InterSystems.Data.IRISClient
Imports InterSystems.Data.IrisTypes
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim IrisConnect As IRISConnection = New IRISConnection()
IrisConnect.ConnectionString = "Server = localhost; " + "Port = 51773; " + "Namespace = TESTSAMPLES; " + "Password = yourpass; " + "User ID = yourname;"
IrisConnect.Open()
Dim SQLtext As String = "SELECT * FROM SQLUser.MercForNLP WHERE ID = 1"
Dim Command As New IRISCommand(SQLtext, IrisConnect)
Dim Reader As IRISDataReader = Command.ExecuteReader()
Dim smsg As String
'While (Reader.Read())
Reader.Read()
smsg = "TinyProvider output: \r\n " _
+ CStr(Reader(Reader.GetOrdinal("ID"))) + ": " _
+ Reader(Reader.GetOrdinal("contentFull"))
Console.WriteLine(smsg)
MsgBox(smsg)
'End While
Reader.Close()
Command.Dispose()
IrisConnect.Close()
End Sub
End Class
실행 결과는 다음과 같습니다.


IRIS에는 ObjectBinding은 아직 없지만, "연결되는"구조를 만들기 위해 향후 구현이 계획되고 있다는 담화였습니다. CacheCommand를 사용하여 작성하는 방식으로 연결성을 담보 할 수 있다고 생각합니다.
Reference
이 문제에 관하여(VB.NET에서 InterSystems IRIS Platform 데이터베이스에 액세스하는 방법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/torisan_/items/24aeee9fdf6459b952c8텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)