Siebel 适配器中的 SiebelConnection 类
Siebel 的数据提供程序访问基础 Siebel 适配器Binding
、 ConnectionFactory
和 Channel
以连接到 Siebel 系统。 Siebel 的数据提供程序实现 DbConnection
类以支持上述功能。
使用 的 Microsoft.Data.SiebelClient.SiebelClientFactory
实例,客户端程序可以获取 类的 System.Data.Common.DbConnection
实例以连接到 Siebel 系统。
//In this example, factory is an instance of SiebelClientFactory
DbConnection connection = factory.CreateConnection();
或者,可以使用以下方法创建连接:
SiebelConnection connection = new SiebelConnection();
connection.ConnectionString = connectionString;
SiebelConnection
类继承自 DbConnection
。 它存在于命名空间 Microsoft.Data.SiebelClient
中。
受支持的属性
类 SiebelConnection
支持以下 DbConnection
属性。
名称 | 获取/设置 | 描述 |
---|---|---|
ConnectionString | 获取和设置 | 获取或设置用于打开连接的字符串。 |
Database | 获取 | 在连接打开之后获取当前数据库的名称,或者在连接打开之前获取连接字符串中指定的数据库名。 这应该是 Siebel 存储库名称。 |
DataSource | 获取 | 获取此连接的 Siebel 网关的名称。 |
ServerVersion | 获取 | 在 Siebel 数据提供程序的当前版本中,此属性返回一个硬编码值,该值不表示 Siebel 服务器的实际版本。 |
State | 获取 | 获取描述连接状态的字符串。 这可以包含三个可能的值:OPEN、BROKEN 或 CLOSED。 |
支持的方法
类 SiebelConnection
支持以下 DbConnection
方法。
名称 | 说明 |
---|---|
CreateDbCommand | 此受保护的方法提供一个新的 DbCommand 实例。 |
ChangeDatabase | 此公共方法不受支持,如果调用,将引发异常。 |
打开 | 通过创建 WCF 通道来打开与 Siebel 系统的连接。 |
关闭 | 通过关闭 WCF 通道来关闭与 Siebel 系统的连接。 |
CreateCommand | 创建命令对象。 |