Table of Contents

Class OleDBConnectionProvider

Namespace
DevExpress.Xpo.DB
Assembly
DevExpress.Xpo.v24.1.dll

Implements the base functionality for providers that connect to OLE DB data sources.

public abstract class OleDBConnectionProvider : ConnectionProviderSql
Inheritance
OleDBConnectionProvider
Derived

Constructors

OleDBConnectionProvider(IDbConnection, AutoCreateOption)

Initializes a new instance of the OleDBConnectionProvider class with the specified settings.

public OleDBConnectionProvider(IDbConnection connection, AutoCreateOption autoCreateOption)

Parameters

connection IDbConnection

An object implementing the IDbConnection interface that represents an open connection to a data source.

autoCreateOption AutoCreateOption

An DevExpress.Xpo.DB.AutoCreateOption value that specifies which operations are performed when the data store is accessed for the first time. This parameter is used to initialize the IDataStore.AutoCreateOption property.

Fields

SortColumnsAlphabetically

Specifies how to order columns retrieved via the GetStorageTables and OleDBConnectionProvider.GetTableSchema methods. By default, this field is set to true, and the columns are listed alphabetically. If the field is set to false, the columns are returned as they appear in the database.

public static bool SortColumnsAlphabetically

Field Value

bool

Properties

ConnectionHelper

protected ReflectConnectionHelper ConnectionHelper { get; }

Property Value

ReflectConnectionHelper

ReflectionHelper

protected OleDbReflectionHelperBase ReflectionHelper { get; }

Property Value

OleDbReflectionHelperBase

Methods

CollectTablesToCreate(ICollection)

This method supports the internal infrastructure and is not intended to be called directly from your code.

public override ICollection CollectTablesToCreate(ICollection tables)

Parameters

tables ICollection

Returns

ICollection

CreateConnection(string)

protected static IDbConnection CreateConnection(string connectionString)

Parameters

connectionString string

Returns

IDbConnection

GetColumnFromOleDbMetadata(DataRow)

protected DBColumn GetColumnFromOleDbMetadata(DataRow colDefinition)

Parameters

colDefinition DataRow

Returns

DBColumn

GetOleDbProviderName(IDbConnection)

protected static string GetOleDbProviderName(IDbConnection connection)

Parameters

connection IDbConnection

Returns

string

GetTableSchema(DBTable, bool, bool)

This member supports the internal infrastructure and is not intended to be used directly from your code.

public override void GetTableSchema(DBTable table, bool checkIndexes, bool checkForeignKeys)

Parameters

table DBTable
checkIndexes bool
checkForeignKeys bool

ModifyDataAsync(CancellationToken, params ModificationStatement[])

public override Task<ModificationResult> ModifyDataAsync(CancellationToken cancellationToken, params ModificationStatement[] dmlStatements)

Parameters

cancellationToken CancellationToken
dmlStatements ModificationStatement[]

Returns

Task<ModificationResult>

ProcedureContainsParameters(string)

protected bool ProcedureContainsParameters(string sourceString)

Parameters

sourceString string

Returns

bool

SelectDataAsync(CancellationToken, params SelectStatement[])

public override Task<SelectedData> SelectDataAsync(CancellationToken cancellationToken, params SelectStatement[] selects)

Parameters

cancellationToken CancellationToken
selects SelectStatement[]

Returns

Task<SelectedData>

UpdateSchemaAsync(CancellationToken, bool, params DBTable[])

public override Task<UpdateSchemaResult> UpdateSchemaAsync(CancellationToken cancellationToken, bool doNotCreateIfFirstTableNotExist, params DBTable[] tables)

Parameters

cancellationToken CancellationToken
doNotCreateIfFirstTableNotExist bool
tables DBTable[]

Returns

Task<UpdateSchemaResult>