iris.connect() は、新しい Connection オブジェクトを返し、InterSystems IRIS のインスタンスへの新規接続の作成を試みます。接続が成功するとオブジェクトは開かれ、それ以外の場合は閉じられます (Cursor.isClosed() を参照)。
iris.connect(hostname,port,namespace,username,password,timeout,sharedmemory,logfile)
iris.connect(connectionstr,username,password,timeout,sharedmemory,logfile)
最後に成功した接続試行の hostname、port、namespace、timeout、および logfile が Connection オブジェクトのプロパティとして保存されます。
パラメータ:
パラメータは位置またはキーワードによって渡すことができます。
-
hostname — サーバ URL を指定する str
-
port — スーパーサーバ・ポート番号を指定する int
-
namespace — ネームスペース・サーバを指定する str
-
以下のパラメータを、hostname、port、および namespace の引数の代わりに使用できます。
-
username — ユーザ名を指定する str
-
password — パスワードを指定する str
-
timeout (オプション) — 接続試行時に待機する最大ミリ秒数を指定する int既定値は 10000 です。
-
sharedmemory (オプション) — bool を True に指定すると、ホスト名が localhost または 127.0.0.1 の場合に共有メモリ接続を試行します。False に指定すると、TCP/IP 経由の接続を強制します。既定値は True です。
-
logfile (オプション) — クライアント側のログ・ファイル・パスを指定する strパスの最大長は、255 文字の ASCII 文字です。