Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » SQL Anywhere Server - Programming » SQL Anywhere Data Access APIs » SQL Anywhere .NET 2.0 API reference » iAnywhere.Data.SQLAnywhere namespace (.NET 2.0) » SAConnection class

 

SAConnection members

Public constructors
Member name Description

SAConnection constructors

Initializes a new instance of the SAConnection class.

Public properties
Member name Description

ConnectionString property

Provides the database connection string.

ConnectionTimeout property

Gets the number of seconds before a connection attempt times out with an error.

DataSource property

Gets the name of the database server.

Database property

Gets the name of the current database.

InitString property

A command that is executed immediately after the connection is established.

ServerVersion property

Gets a string that contains the version of the instance of SQL Anywhere to which the client is connected.

State property

Indicates the state of the SAConnection object.

Public methods
Member name Description

BeginTransaction methods

Returns a transaction object. Commands associated with a transaction object are executed as a single transaction. The transaction is terminated with a call to the Commit or Rollback methods.

ChangeDatabase method

Changes the current database for an open SAConnection.

ChangePassword method

Changes the password for the user indicated in the connection string to the supplied new password.

ClearAllPools method

Empties all connection pools.

ClearPool method

Empties the connection pool associated with the specified connection.

Close method

Closes a database connection.

CreateCommand method

Initializes an SACommand object.

EnlistDistributedTransaction method

Enlists in the specified transaction as a distributed transaction.

EnlistTransaction method

Enlists in the specified transaction as a distributed transaction.

GetSchema methods

Returns the list of supported schema collections.

Open method

Opens a database connection with the property settings specified by the SAConnection.ConnectionString.

Public events
Member name Description

InfoMessage event

Occurs when the SQL Anywhere database server returns a warning or informational message.

StateChange event

Occurs when the state of the SAConnection object changes.

See also