Find

Article
· Oct 5, 2020 9m read

Caché .Net BindingアプリケーションをIRISの.Net Native APIを利用して書き換える方法(その3)

ここで紹介するサンプルは、以下のGitHubから入手可能です。

 

IRIS .Netサンプル

 

jpegファイルを読んで、IRISデータベースに格納するサンプル

 

上記GitHub上のinsertbinary\insertbinary\binread.csというファイル名です。

処理内容は、ファイルシステム上のjpeg形式のファイルを読み込んで、BLOB形式でIRISデータベースに格納します。

Caché ではADO.NET Managed Providerを使用して実装していましたが、それをIRISのInterSystems Managed Provider for .NETを使用して書き換えました。
(名前が変わっていますが、ADO.NETに関しては、機能はほとんど同じです)

従って、厳密に言うと.Net Native APIを使用していませんが、コネクションオブジェクトの使用方法は共通なので、この部分は、Native APIを使用していると言うこともできます。

Caché での実装は、以下の通りです。

 

// binread.cs
using System;
using System.IO;

CacheCommand            spCache;
CacheConnection        cnCache;
CacheDataAdapter        daCache;
CacheTransaction        txCache=null;
DataSet                dsCache;
DataTable            dtCache;
DataRow                drCache;

class BinaryRead {
  static void Main(string[] args) {
    //存在するファイルを指定する
    FileStream fs = new FileStream(
      @"c:\temp\picture\xxx.jpeg", FileMode.Open, FileAccess.Read)
    int fileSize = (int)fs.Length; // ファイルのサイズ
    byte[] buf = new byte[fileSize]; // データ格納用配列
    int readSize; // Readメソッドで読み込んだバイト数
    int remain = fileSize; // 読み込むべき残りのバイト数
    int bufPos = 0; // データ格納用配列内の追加位置
    readSize = fs.Read(buf, 0, fs.Length)
    string cacheConnectString = "Server = localhost;Port=1972;Namespace=User;Password=SYS;User ID = _SYSTEM;";

    cnCache = new CacheConnection(cacheConnectString);
    cnCache.Open();
    spCache = new CacheCommand("Insert into MyApp.Person2(Name, Picture) Values(?, ?)", cnCache, txCache);
    CacheParameter    pName    = new CacheParameter();
    pName.ParameterName        = "Name";
    pName.CacheDbType        = CacheDbType.NVarChar;
    pName.Direction            = ParameterDirection.Input;
    pName.Value                = "Hoge Hoge;
    CacheParameter    pPicture = new CacheParameter();
    pDOB.ParameterName        = "Picture";
    pName.CacheDbType        = CacheDbType.LONGVARBINARY;
    pDOB.Direction        = ParameterDirection.Input;
    pDOB.Value                = buf;
    spCache.ExecuteNonQuery();
    fs.Dispose();
    cnCache.close();
  }
}


IRISで書き換えたソースは以下の通りです。

 

// binread.cs
using System;
using System.IO;
using System.Data;
using InterSystems.Data.IRISClient;
using InterSystems.Data.IRISClient.ADO;

namespace binaryfileread {
    class binaryfileread 
    {
    [STAThread]
    static void Main(string[] args) {
        IRISCommand spIRIS;
        IRISConnection cnIRIS;
        IRISTransaction txIRIS = null;

        //存在するファイルを指定する
        FileStream fs = new FileStream(
        @"c:\temp\test.jpeg", FileMode.Open, FileAccess.Read);
        int fileSize = (int)fs.Length; // ファイルのサイズ
        byte[] buf = new byte[fileSize]; // データ格納用配列
        long readSize; // Readメソッドで読み込んだバイト数
        int remain = fileSize; // 読み込むべき残りのバイト数
        readSize = fs.Read(buf, 0, (int)fs.Length);
        string IRISConnectString = "Server = localhost;Port=1972;Namespace=User;Password=SYS;User ID = _SYSTEM;";

        cnIRIS = new IRISConnection(IRISConnectString);
        cnIRIS.Open();
        spIRIS = new IRISCommand("Insert into MyApp.Person2(Name, Picture) Values(?, ?)", cnIRIS, txIRIS); 

        IRISParameter pName = new IRISParameter();
        pName.ParameterName = "Name";
        pName.IRISDbType = IRISDbType.NVarChar;
        pName.Direction = ParameterDirection.Input;
        pName.Value = "Hoge Hoge";
        spIRIS.Parameters.Add(pName);

        IRISParameter pPicture = new IRISParameter();
        pPicture.ParameterName = "Picture";
        pPicture.IRISDbType = IRISDbType.LongVarBinary;
        pPicture.Direction = ParameterDirection.Input;
        pPicture.Value = buf;
        spIRIS.Parameters.Add(pPicture);

        spIRIS.ExecuteNonQuery();
        fs.Dispose();
        cnIRIS.Close();
    }
   }
}


CachéとIRISでは、ADO.NETに関しては、関数等の名前がCacheからIRISに変更になっているという違いがあります。

 

参照の変更

 

まず以前の参照を削除します。

Visual Studioのソリューションエクスプローラーの所で参照をクリックします。

表示されるInterSystems.Data.CacheClientを削除します。
(右クリックして削除を選ぶ)

 

次にプロジェクトメニューから参照の追加をクリックして、以下の2つのファイルを選択します。
(プロジェクトの.Net Frameworkバージョンに合わせて、それに対応するファイルを選択する
以下の例は、v4.5を選択)

 

c:\InterSystems\IRIS\dev\dotnet\bin\v4.5 
InterSystems.Data.IRISClient.dll

 

jpegファイルを読んで、フォーム上にそのjpegファイルの内容を表示するサンプル

 

上記GitHub上の\VBImage\VBImage\Forms1.vbというファイル名です。

 

処理内容は、ファイルシステム上のjpeg形式のファイルを読み込んで、VB.NETのフォーム上のPictureオブジェクトとして表示します。

Caché では.NET Managed Providerの.Net Bindingを使用して実装していましたが、それをIRISの.Net Native APIを使用して書き換えました。

Caché での実装は以下の通りです。

 

Imports InterSystems.Data.CacheClient
Imports InterSystems.Data.CacheTypes
Imports System.Drawing
Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim cn As CacheConnection
        cn = New CacheConnection("Server=127.0.0.1;Port=1972;Namespace=User;Username=_system;Password=SYS")
        cn.Open()
        Dim img As System.IO.FileStream
        img = New System.IO.FileStream("C:\temp\test.jpg", System.IO.FileMode.Open, IO.FileAccess.Read)
        Dim f As User.Fax
        ' NEW -----------
        f = New User.Fax(cn)
        img.CopyTo(f.pic)
        f.memo = "abcde"
        f.Save()
        f.Dispose()
        MsgBox("Done!")
        cn.Close()
    End Sub
 
 Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
        Dim cn As CacheConnection
        cn = New CacheConnection("Server=127.0.0.1;Port=1972;Namespace=User;Username=_system;Password=SYS")
        cn.Open()
       Dim f As User.Fax
        f = User.Fax.OpenId(cn, 1)
        PictureBox1.Image = Image.FromStream(f.pic)
        cn.Close()
    End Sub
End Class

 

IRISで書き換えたソースです。

 

Imports InterSystems.Data.IRISClient
Imports InterSystems.Data.IRISClient.ADO
Imports System.Drawing
Imports System.IO
Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim cn As IRISConnection
        cn = New IRISConnection("Server=127.0.0.1;Port=1972;Namespace=User;Username=_system;Password=SYS")
        cn.Open()
        Dim iris As IRIS
        Dim irisobject As IRISObject
        Dim memstream As New MemoryStream
        Dim str As String
        Dim buf As Byte()
        Dim pic As IRISObject
        iris = IRIS.CreateIRIS(cn)
        irisobject = iris.ClassMethodObject("User.Fax", "%New")
        Dim img As System.IO.FileStream
        img = New System.IO.FileStream("C:\temp\test.jpg", System.IO.FileMode.Open, IO.FileAccess.Read)
        buf = New Byte(img.Length) {}
        img.Read(buf, 0, img.Length)
        str = System.Text.Encoding.GetEncoding("ISO-8859-1").GetString(buf)
        pic = irisobject.GetObject("pic")
        pic.InvokeVoid("Write", str)
        irisobject.InvokeIRISStatusCode("%Save")
        'Dim f As User.Fax
        ' NEW -----------
        'f = New User.Fax(cn)
        'img.CopyTo(f.pic)
        'f.memo = "abcde"
        'f.Save()
        'f.Dispose()
        MsgBox("Done!")
        cn.Close()
    End Sub

    Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
        Dim cn As IRISConnection
        Dim iris As IRIS
        Dim irisobject As IRISObject
        Dim pic As IRISObject
        Dim memorystream As New MemoryStream
        Dim buf As Byte()
        Dim str As String
        Dim len As Long
        cn = New IRISConnection("Server=127.0.0.1;Port=1972;Namespace=User;Username=_system;Password=SYS")
        cn.Open()
        iris = IRIS.CreateIRIS(cn)
        irisobject = iris.ClassMethodObject("User.Fax", "%OpenId", 1)
        pic = irisobject.GetObject("pic")
        len = pic.InvokeLong("SizeGet")
        str = pic.InvokeString("Read", len)
        buf = System.Text.Encoding.GetEncoding("ISO-8859-1").GetBytes(str)
        memorystream.Write(buf, 0, len)
        PictureBox1.Image = Image.FromStream(MemoryStream)
        cn.Close()
    End Sub
End Class

 

良くコードを見るとわかりますが、IRIS版のほうが処理がかなり長くなっています。

 

結論を言うとこのケースはIRIS .Net Native APIを使用して書き換えるのは得策ではありません。
ADO.NETを使用したほうが簡単に処理できます。

 

上記GitHub上の\VBImageADO配下にADO.NETで書き換えたサンプルも用意しましたので、ご参考下さい。

Discussion (0)1
Log in or sign up to continue
Article
· Sep 30, 2020 2m read

コンソールログに出力される [SYSTEM MONITOR] DBLatency... の警告について

これはInterSystems FAQ サイトの記事です。

DBLatency の Warning メッセージは、ヘルス・モニタプロセスが定期的にデータベースからのランダム読み取りが完了するまでに要した時間(ミリ秒)を計測していて、設定されている閾値(1000 msec)を超えた場合に出力されます。

mm/dd/yy-18:31:15:060 (2932) 1 [SYSTEM MONITOR] DBLatency(c:\xxx\) Warning: DBLatency = 1510 ( Warnvalue is 1000).


上記例では、C:\xxx\IRIS.DAT(または C:\xxx\CACHE.DAT)へのディスク読み取り I/O に 1510 msec かかったことを示していて、メッセージ出力時のディスク I/O 応答速度が遅いことが考えられます。

ディスク I/O 応答速度が遅い原因としては、ディスク I/O 負荷が高いことが考えられます。

  • 大量のデータ登録や変更を行う処理が実施されていた。
  • 弊社製品以外のソフト(アンチウイルスソフト、バックアップソフト)が動作していた。
  • 弊社製品以外のアプリケーションによるディスク負荷など。
  • 仮想環境の場合に、他の仮想マシン(VM)で上記のような負荷の高い処理が行われ、その影響を受けていた。

その他、RAID構成のメンバディスクで障害が発生している なども考えられます。


原因調査のためには、現象発生中のパフォーマンスの情報収集が必要となります。
情報収集方法については、パフォーマンス低下時の情報収集ツールについて をご覧ください。

また、事象が起きた背景や前後の状況を確認できますので、以下の情報収集もしていただくと有用です。
【FAQ】トラブル発生時、管理者が最初に行うべきことを教えてください 


なお、コンソールログのメッセージの深刻度ですが、0 は Information、1 は Warning、2 は Alert を示します。  

ヘルスモニタでは、深刻度の数値を以下のように分けて出力しています。

【Alert の場合】
ある期間のセンサの読み取り値が 3 回連続してセンサの最大値を上回った場合にアラート(深刻度 2 の通知)を生成

【Warning の場合】
ある期間のセンサの読み取り値が 5 回連続してセンサの警告値を上回った場合にワーニング (深刻度 1 の通知)を生成

ヘルスモニタについて詳細は以下ドキュメントをご参照ください。
ヘルスモニタについて【IRIS】
Cachéヘルスモニタについて


enlightened【ご参考】
ヘルスモニタでのチェック頻度およびアラート通知条件の確認と変更方法

Discussion (0)0
Log in or sign up to continue
Article
· Sep 29, 2020 4m read

Debugging “Server Availability Error” message when loading Web Application

In the WRC, we frequently see customers contact us because their Web Gateway is unable to serve web pages. This article will explain a frequent reason why these errors can occur, and explain some tools which can be used to debug the problem. This explanation is focused on the Web Gateway serving InterSystems IRIS instances, but the same explanation should apply to the CSP Gateway serving Caché instances as well.

The Problem:

Attempting to load a Web Application (either a custom application or the System Management Portal) results in one of the following errors (depending on your browser):

In addition, the CSP.log file shows:

Why this happens:

To understand why this happens, we need to take a look at the architecture which the Web Gateway functions in:

When you try to load your application in a browser, the browser sends a request to your Web Server. The Web Server passes this request off to the Web Gateway. The Web Gateway then has to reach out to InterSystems IRIS to understand what to do with the request. But given that the Web Gateway lives outside of InterSystems IRIS (and might be on another machine entirely), we require that the Web Gateway process authenticate to IRIS. This is the same as we would require for any other new processes connecting to IRIS, such as remote ODBC connections or a simple local IRIS Terminal Sessions.

The reason we are seeing the above errors when loading the application are because this authentication from the Web Gateway to IRIS is failing. The Web Gateway configuration stores within its CSP.ini file a set of credentials for each InterSystems IRIS server it connects to. Normally, these credentials are for the “CSPSystem” user, which is an account created by default when IRIS is installed. These credentials are then used to try and authenticate using the settings configured for the %Service_WebGateway Service in IRIS.

 To understand more information about why this authentication is failing, you can use the Audit capabilities offered by InterSystems IRIS. Given that you likely cannot use the Management Portal at this time, you can use the ^SECURITY routine in an IRIS Terminal Session in order to configure Auditing and view the Audit Log.

First off, you will need to Enable Auditing, if it has not already been enabled:

Next, make sure that Auditing for the %System/%Login/LoginFailure Event is enabled:

Once you’ve done that, you can reproduce the “Server Availability Error” problem. This should result in a LoginFailure Audit Event being logged, and you can examine the details for this event to find out more:

The “Error message” section should provide more information about why we are seeing the LoginFailure. Common problems include “User CSPSystem is disabled” or “Service %Service_WebGateway is not enabled for Password authentication”, which suggest changes which should be made to the IRIS Security Settings.

The most common problem that we see in the WRC is that authentication is failing due to “Invalid password”. This means that the CSPSystem password stored in the Web Gateway does not match the CSPSystem password stored in IRIS.

How to fix the problem:

Now that the Audit Log entry gives you a clear indication of what the mismatch is between the Web Gateway and InterSystems IRIS, you have to fix that mismatch. The IRIS-side CSPSystem credentials can be modified through the ^SECURITY menu in a Terminal session.

There are a few ways to modify the CSPSystem credentials stored in the Web Gateway. The easiest way will be to access the Web Gateway Management Portal, which is documented here: https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=GCGI_oper_config  Once you’ve loaded the Web Gateway Management Page, you can edit the credentials used to authenticate to IRIS by clicking the Server Access link, and editing the Connection Security settings for the relevant Server.

If you are not able to access the Web Gateway Management Page, then you are left with editing the CSP.ini file. The CSP.ini file should have sections for each Server Definition configured in the Web Gateway. You should be able to edit the “Username” and “Password” sections in the relevant section to match what is stored in InterSystems IRIS. Note that the [SYSTEM] section controls access to the Web Gateway Management Portal, not an InterSystems IRIS instance named [SYSTEM].

For example, if you have a definition to server “Test” where the CSPSystem password is incorrect:

You can edit the CSP.ini file to have the correct plaintext password:

The next time you try to authenticate from the Web Gateway to InterSystems IRIS, the password will be encrypted:

1 Comment
Discussion (1)1
Log in or sign up to continue
Article
· Sep 17, 2020 4m read

Native API for ObjectScript Demo

The demo is based on the raw class descriptions.
The data classes used are Address, Person, Employee, Company
For a more attractive demo, a JSONtoString method by ID was added.

After installation with ZPM just run from Terminal

USER>do ##class(rcc.ONAPI.demo).Run()
Adjust Parameters
host[127.0.0.1]:
port[51773]:
namespace[USER]:
user[_SYSTEM]:
pwd[SYS]:
timeout[5]:
****** connected ********

Next, you get a list of possible demo actions.
No input means no action.
The menu loops until you exit.

Populate Person by:100
     100
Populate Company by:10
     10
Populate Employee by:50
     50
Show Person by ID:3
     {"Name":"Rogers,Norbert V.","SSN":"990-11-9806","DOB":"1962-04-23","Home":{"Street":"867 Oak Street","City":"Denver","State":"NH","Zip":"64647"},"Office":{"Street":"3309 Oak Court","City":"Denver","State":"NY","Zip":"76436"},"FavoriteColors":["Green","Green"],"Age":58}

Show Company by ID:3
     {"Name":"CompuComp Corp.","Mission":"Specializing in the development and manufacturing of open-source object-oriented models for additive manufacturing.","TaxID":"Y8155","Revenue":819493934,"Employees":[{"Name":"Ahmed,Sophia P.","SSN":"936-73-5161","DOB":"1933-08-08","Home":{"Street":"8758 Elm Street","City":"Fargo","State":"OH","Zip":"40652"},"Office":{"Street":"1578 Maple Street","City":"Larchmont","State":"IA","Zip":"89021"},"Spouse":{"Name":"Olsen,William A.","SSN":"912-52-4809","DOB":"2010-01-26","Home":{"Street":"2933 Main Street","City":"Bensonhurst","State":"WA","Zip":"51960"},"Office":{"Street":"4994 Ash Street","City":"Gansevoort","State":"OR","Zip":"89750"},"Spouse":{"Name":"Adam,Brian D.","SSN":"799-82-3083","DOB":"2005-11-04","Home":{"Street":"1264 Oak Avenue","City":"Chicago","State":"WV","Zip":"34943"},"Office":{"Street":"7443 Second Avenue","City":"Zanesville","State":"CO","Zip":"30478"},"Spouse":{"Name":"Cooke,Diane C.","SSN":"754-49-5729","DOB":"1984-01-12","Home":{"Street":"9624 Maple Place","City":"Albany","State":"MS","Zip":"60948"},"Office":{"Street":"4711 Second Place","City":"Youngstown","State":"VA","Zip":"31250"},"Age":36},"FavoriteColors":["Orange"],"Age":14},"FavoriteColors":["Green","Green"],"Age":10,"Title":"Senior Systems Engineer","Salary":61511},"Age":87,"Title":"Product Manager","Salary":59127},{"Name":"Ng,Elmo S.","SSN":"201-15-3259","DOB":"1954-10-14","Home":{"Street":"2437 Main Avenue","City":"Xavier","State":"KY","Zip":"10156"},"Office":{"Street":"2770 Oak Drive","City":"Tampa","State":"OH","Zip":"18459"},"Spouse":{"Name":"Eastman,Linda M.","SSN":"110-41-1818","DOB":"1980-03-19","Home":{"Street":"5309 Ash Drive","City":"Xavier","State":"RI","Zip":"36964"},"Office":{"Street":"4288 Washington Place","City":"Xavier","State":"HI","Zip":"41889"},"Spouse":{"Name":"Huff,Dave C.","SSN":"559-32-3838","DOB":"1973-05-05","Home":{"Street":"6216 First Avenue","City":"Tampa","State":"WA","Zip":"68628"},"Office":{"Street":"2896 Clinton Drive","City":"Elmhurst","State":"UT","Zip":"97796"},"FavoriteColors":["Purple"],"Age":47},"FavoriteColors":["Purple","Blue"],"Age":40},"FavoriteColors":["Red","Purple"],"Age":65,"Title":"Laboratory Marketing Manager","Salary":35888}]}

Show Employee by ID:103
     {"Name":"Faust,Buzz H.","SSN":"979-41-6347","DOB":"1938-02-07","Home":{"Street":"6231 Madison Avenue","City":"Gansevoort","State":"TX","Zip":"49085"},"Office":{"Street":"6402 Main Street","City":"Elmhurst","State":"RI","Zip":"82976"},"Spouse":{"Name":"Joyce,Chad C.","SSN":"199-86-8085","DOB":"1974-11-17","Home":{"Street":"6229 Main Street","City":"Reston","State":"FL","Zip":"16922"},"Office":{"Street":"8509 Elm Blvd","City":"Bensonhurst","State":"HI","Zip":"90665"},"Spouse":{"Name":"Cooke,Diane C.","SSN":"754-49-5729","DOB":"1984-01-12","Home":{"Street":"9624 Maple Place","City":"Albany","State":"MS","Zip":"60948"},"Office":{"Street":"4711 Second Place","City":"Youngstown","State":"VA","Zip":"31250"},"Age":36},"FavoriteColors":["Purple"],"Age":45},"Age":82,"Title":"Global Administrator","Salary":13813}

Show Global PersonD by ID:4
     $Data()=1
     Value=$lb("","Eastman,Mary C.","887-18-3730",44711,$lb("3889 Ash Blvd","Washington","TX",67862),$lb("5709 Oak Blvd","Chicago","IL",30845),"","")

Index list for Person & Employee (n,y):y
     $Employee
     $Person
     NameIDX
     SSNKey
     ZipCode
Exit Demo (n,y,*):
Populate Person by:
Populate Company by:
Populate Employee by:
Show Person by ID:
Show Company by ID:
Show Employee by ID:104
     {"Name":"Novello,Emily I.","SSN":"411-35-4234","DOB":"1943-01-07","Home":{"Street":"3353 Washington Court","City":"Hialeah","State":"MT","Zip":"22403"},"Office":{"Street":"9743 Clinton Blvd","City":"Xavier","State":"OH","Zip":"89038"},"Spouse":{"Name":"Goldman,Usha T.","SSN":"465-59-4053","DOB":"1987-07-16","Home":{"Street":"2578 Second Blvd","City":"Gansevoort","State":"FL","Zip":"77552"},"Office":{"Street":"6986 Main Street","City":"Elmhurst","State":"VT","Zip":"48713"},"Spouse":{"Name":"Rogers,Norbert V.","SSN":"990-11-9806","DOB":"1962-04-23","Home":{"Street":"867 Oak Street","City":"Denver","State":"NH","Zip":"64647"},"Office":{"Street":"3309 Oak Court","City":"Denver","State":"NY","Zip":"76436"},"FavoriteColors":["Green","Green"],"Age":58},"Age":33},"FavoriteColors":["Green","White"],"Age":77,"Title":"Senior Product Specialist","Salary":96469}

Show Global PersonD by ID:
Index list for Person & Employee (n,y):
Exit Demo (n,y,*):y
****** done ********
 
USER>

GitHub

Discussion (0)0
Log in or sign up to continue
Article
· Sep 14, 2020 3m read

IRIS Native API for ObjectScript

It seems to me that for some reason this didn't make its way to the official documentation
and seems to be rather unknown though implemented already in IRIS 2020.1

Thanks to @Dan Pasco I got a hint on the classes involved.
I used the recommended sequence of how to use it. 
it is all directly taken from Class Reference and I just collected it to create a first overview.

The Native API for ObjectScript follows the API used on other language platforms. It starts with a static API that allows the user to connect to an IRIS Namespace, either local or remote, using an Iris Connection. The connection interface allows the user to then instantiate the IRIS Native API class (%Net.DB.Iris). That instance can then be used to access IRIS Global Arrays, manage transactions, invoke functions and methods implemented in routines or classes, and instantiate remote iterators.

%Net.DB.DataSource

This class implements the IRIS Native API for Object Script DataSource interface.
At this time that interface consists solely of the CreateConnection method.

CreateConnection accepts url, port,namespace, user, and pwd parameters. Refer to %Net.DB.Connection for more information on these parameters. CreateConnection() returns an instance of %Net.DB.Connection.

host input The host name or address, defaults to 127.0.0.1
port input The port on which to connect
namespace input The namespace to connect to

user

input The user's name
pwd input User's password
timeout input The number of seconds to wait for the connection to be established. Optional.
logfile input The name of the file to be used for logging. If specified, connection activity will be logged to that file. Optional.
  return An oref referencing an instance of %Net.DB.Connection

 

 %Net.DB.Connection

This class implements the IRIS Native API for Object Script Connection interface.
This class should never be instantiated directly, only through %Net.DB.DataSource using the CreateMethod() function.

The public interface for this class includes only those items specified here. All other members are internal.

Host property The host specified when establishing the connection
Port property The port that this connection is connected.
Namespace property The namespace that this connection is connected.
Timeout property The timeout value specified establishing the connection
IsClosed method Returns true if this connection instance is no longer connected.
Close method Close this connection.
CreateIris method Returns an instance of %Net.DB.Iris.

 

%Net.DB.Iris

This class implements the primary set of functions IRIS Native API for Object Script.
The only other members of the IRIS Native API that are not implemented by this class
are implemented by %Net.DB.DataSource and %Net.DB.Connection.
This class should never be instantiated directly.
The proper way to instantiate this class is to invoke the CreateIris() method using an instance of %Net.DB.Connection.

Summary of methods:

 

GitHub

1 Comment
Discussion (1)0
Log in or sign up to continue