Represents a set of methods for creating instances of the iAnywhere.Data.SQLAnywhere provider's implementation of the data source classes.
Public NotInheritable Class SAFactory Inherits System.Data.Common.DbProviderFactory
public sealed class SAFactory : System.Data.Common.DbProviderFactory
All members of SAFactory class, including all inherited members.
Name | Description |
---|---|
Returns a strongly typed System.Data.Common.DbCommand instance. | |
Returns a strongly typed System.Data.Common.DbCommandBuilder instance. | |
Returns a strongly typed System.Data.Common.DbConnection instance. | |
Returns a strongly typed System.Data.Common.DbConnectionStringBuilder instance. | |
Returns a strongly typed System.Data.Common.DbDataAdapter instance. | |
Returns a strongly typed System.Data.Common.DbDataSourceEnumerator instance. | |
Returns a strongly typed System.Data.Common.DbParameter instance. | |
Returns a strongly-typed CodeAccessPermission instance. | |
Always returns true, which indicates that an SADataSourceEnumerator object can be created. | |
Represents the singleton instance of the SAFactory class. |
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 http://msdn2.microsoft.com/en-us/library/ms379620.aspx.
The SAFactory class is not available in the .NET Compact Framework 2.0.
CreateCommand method
CreateCommandBuilder method
CreateConnection method
CreateConnectionStringBuilder method
CreateDataAdapter method
CreateDataSourceEnumerator method
CreateParameter method
CreatePermission method
CanCreateDataSourceEnumerator property
Instance field
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |