About the ADO.NET Driver

The SQLFire ADO.NET driver is an implementation of Microsoft's ADO.NET interfaces and abstract classes. It provides connectivity to a SQLFire system as a network client driver. In this release of SQLFire, the ADO.NET driver does not support running a SQLFire member in an embedded mode (embedded driver) within an application.

The driver provides fast access to a SQLFire cluster from .NET clients and enables advanced SQLFire features such as:

You can access the driver through any .NET language including C#, C++/CLI, and Visual Basic .NET. As with the JDBC network driver, the ADO.NET driver complies with the DRDA standard protocol and utilizes several SQLFire extensions to provide enhanced features.

The following sections provide more information about the ADO.NET driver:

High Availability

The ADO.NET driver maintains information about the servers available in a SQLFire cluster. If the server to which the client is connected goes down, then the driver automatically re-routes the connection to another server available in the cluster.

To take full advantage of this feature, clients should connect using the address of a stand-alone SQLFire locator rather than a SQLFire server, because locators provide more accurate information about the available servers to which a client can fail over. If you specify the address of a server rather than a stand-alone locator, then it is possible that the client will fail to find any available server if those servers have been taken offline.

If the application is not executing a transaction, then failover occurs transparently to the application. Failed operations are automatically re-executed if necessary. The application does not receive any exceptions as long as at least one server is available in the cluster to service network clients.

However, when querying LOB data-types (BLOB/CLOB), clients may receive an SQLFException with State “XJ217�? due to the LOB handle not being found on the new server. In this case, the client may need to retry the query explicitly (issue #43253 in vFabric SQLFire Limitations provides more details).

In this release of SQLFire, if the application is in the middle of a transaction and the server to which client is connected fails, then the current transaction fails with a connection exception (SQLFException with State “08006�?) and the application must re-execute the transaction. To handle such a case, applications can create a new connection, and then begin a new transaction and retry the transaction.

Load Balancing

When using the SQLFire locator or a locator embedded inside a server, servers inform the active locator of the load on each server using the number of current client connections on the server. This allows the locator to determine the best server to use for a new client connection. In this way, a network client that connects using a locator is always directed to the least-loaded server in the cluster.

Extensions for Batching and Row Locking

Similar to the JDBC API, the ADO.NET driver provides extensions to the DbCommand API to allow for batching without requiring a DbDataAdapter. Also, the DbDataReader implementation, SQLFDataReader, allows for expressing the intent to lock rows when executing a SELECT … FOR UPDATE statement. Additional extensions from the JDBC API are also provided, such as SQLFConnection.AutoCommit.