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

SQL Anywhere 10.0.1 » UltraLite - .NET Programming » UltraLite .NET 2.0 API Reference

GetObjectData method Next Page

ULFactory class

Represents a set of methods for creating instances of the iAnywhere.Data.UltraLite provider's implementation of the data source classes. This is a static class and so cannot be inherited or instantiated.


Visual Basic

Public NotInheritable Class ULFactory
Inherits DbProviderFactory


public sealed class ULFactory : DbProviderFactory


ADO.NET 2.0 adds two new classes, the System.Data.Common.DbProviderFactories class and the System.Data.Common.DbProviderFactory class, to make provider independent code easier to write. To use them with UltraLite.NET specify iAnywhere.Data.UltraLite as the provider invariant name passed to GetFactory. For example:

' Visual Basic
Dim factory As DbProviderFactory = _
  DbProviderFactories.GetFactory( "iAnywhere.Data.UltraLite" )
Dim conn As DbConnection = _

// C#
DbProviderFactory factory = 
        DbProviderFactories.GetFactory( "iAnywhere.Data.UltraLite" );
DbConnection conn = factory.CreateConnection();

In this example, conn is created as an ULConnection object .

For an explanation of provider factories and generic programming in ADO.NET 2.0, see [external link]

UltraLite.NET does not support CreateCommandBuilder(), CreateDataSourceEnumerator(), and CreatePermission().

Restrictions: The ULFactory class is not available in the .NET Compact Framework 2.0.

Inherits: System.Data.Common.DbProviderFactory

See also

ULFactory members
Instance field
CanCreateDataSourceEnumerator property
CreateCommand method
CreateCommandBuilder method
CreateConnection method
CreateConnectionStringBuilder method
CreateDataAdapter method
CreateParameter method