Represents a set of methods for creating instances of the iAnywhere.Data.SQLAnywhere provider's implementation of the data source classes.
There is no constructor for SAFactory.
ADO.NET 2.0 adds two new classes, DbProviderFactories and DbProviderFactory, to make provider independent code easier to write. To use them with SQL Anywhere specify iAnywhere.Data.SQLAnywhere as the provider invariant name passed to GetFactory. For example:
' Visual Basic Dim factory As DbProviderFactory = _ DbProviderFactories.GetFactory( "iAnywhere.Data.SQLAnywhere" ) Dim conn As DbConnection = _ factory.CreateConnection() // C# DbProviderFactory factory = DbProviderFactories.GetFactory("iAnywhere.Data.SQLAnywhere" ); DbConnection conn = factory.CreateConnection();
In this example, conn is created as an SAConnection object.
For an explanation of provider factories and generic programming in ADO.NET 2.0, see Generic Coding with the ADO.NET 2.0 Base Classes and Factories.
The SAFactory class is not available in the .NET Compact Framework 2.0.
Custom Attribute: sealed