Rediger

Del via


SiebelConnection class in the Siebel adapter

The Data Provider for Siebel accesses the underlying Siebel adapterBinding, the ConnectionFactory, and Channel to connect to the Siebel system. The Data Provider for Siebel implements the DbConnection class to support the preceding features.

Using an instance of Microsoft.Data.SiebelClient.SiebelClientFactory, a client program can obtain an instance of the System.Data.Common.DbConnection class to connect to the Siebel system.

//In this example, factory is an instance of SiebelClientFactory  
DbConnection connection = factory.CreateConnection();  

Alternatively, the following approach can be used to create a connection:


SiebelConnection connection = new SiebelConnection();  
connection.ConnectionString = connectionString;  

The SiebelConnection class inherits from DbConnection. It exists in the namespace Microsoft.Data.SiebelClient.

Supported Properties

The SiebelConnection class supports the following DbConnection properties.

Name Get/Set Description
ConnectionString Get and Set Gets or sets the string used to open the connection.
Database Get Gets the name of the current database after a connection is opened, or the database name specified in the connection string before the connection is opened. This should be the Siebel repository name.
DataSource Get Gets the name of the Siebel gateway for this connection.
ServerVersion Get In the current version of Data Provider for Siebel, this property returns a hard-coded value, which does not represent the actual version of the Siebel server.
State Get Gets a string that describes the state of the connection. This can contain three possible values: OPEN, BROKEN, or CLOSED.

Supported Methods

The SiebelConnection class supports the following DbConnection methods.

Name Description
CreateDbCommand This protected method provides a new DbCommand instance.
ChangeDatabase This public method is not supported, and will throw an exception if called.
Open Opens a connection with the Siebel system by creating a WCF channel.
Close Closes a connection with the Siebel system by closing a WCF channel.
CreateCommand Creates a command object.

See Also

Extend ADO.NET Interfaces with the Siebel adapter