Class AccessConnectionProviderMultiUserThreadSafe
- Namespace
- DevExpress.Xpo.DB
- Assembly
- DevExpress.Xpo.v24.1.dll
Implements an Microsoft Access connection provider that can be used in multi-user and multi-threaded applications.
public class AccessConnectionProviderMultiUserThreadSafe : MarshalByRefObject, IDataStore, IDataStoreAsync, IDataStoreSchemaExplorer, IDataStoreForTests, ICommandChannel, ICommandChannelAsync
- Inheritance
-
AccessConnectionProviderMultiUserThreadSafe
- Implements
-
IDataStoreIDataStoreAsyncIDataStoreSchemaExplorerIDataStoreForTestsICommandChannelICommandChannelAsync
- Inherited Members
Constructors
AccessConnectionProviderMultiUserThreadSafe(string, AutoCreateOption)
Initializes a new instance of the AccessConnectionProviderMultiUserThreadSafe class with the specified settings.
public AccessConnectionProviderMultiUserThreadSafe(string connectionString, AutoCreateOption autoCreateOption)
Parameters
connectionString
stringA connection string. This parameter is used to initialize the AccessConnectionProviderMultiUserThreadSafe.ConnectionString property.
autoCreateOption
AutoCreateOptionAn DevExpress.Xpo.DB.AutoCreateOption value that specifies which operations should be performed when the data store is accessed for the first time. This parameter is used to initialize the AccessConnectionProviderMultiUserThreadSafe.AutoCreateOption property.
Fields
ConnectionString
Gets the connection string.
public readonly string ConnectionString
Field Value
XpoProviderTypeString
Gets the name of the current connection provider. This name is used internally when generating a connection string via the AccessConnectionProviderMultiUserThreadSafe.GetConnectionString method.
public const string XpoProviderTypeString = "MSAccessSafe"
Field Value
Properties
AutoCreateOption
Returns which operations are performed when a session is connected to a data store.
[Browsable(false)]
public AutoCreateOption AutoCreateOption { get; }
Property Value
- AutoCreateOption
An DevExpress.Xpo.DB.AutoCreateOption value that specifies which operations are performed when a session is connected to a data store.
Methods
CreateProviderFromString(string, AutoCreateOption, out IDisposable[])
This method supports the internal infrastructure and is not intended to be called directly from your code.
public static IDataStore CreateProviderFromString(string connectionString, AutoCreateOption autoCreateOption, out IDisposable[] objectsToDisposeOnDisconnect)
Parameters
connectionString
stringautoCreateOption
AutoCreateOptionobjectsToDisposeOnDisconnect
IDisposable[]
Returns
- IDataStore
GetConnection()
protected IDbConnection GetConnection()
Returns
GetConnectionString(string)
Returns a connection string to the specified Microsoft Access data base.
public static string GetConnectionString(string database)
Parameters
database
stringA string that specifies the path and name of the data base to connect to.
Returns
- string
A connection string.
GetConnectionString(string, string, string)
Returns a connection string to the specified Microsoft Access data base using the specified credentials.
public static string GetConnectionString(string database, string userId, string password)
Parameters
database
stringA string that specifies the path and name of the data base to connect to.
userId
stringA string that specifies the user’s name. This is used to initialize the “User ID” field of the connection string.
password
stringA string that specifies the password. This is used to initialize the “Password” field of the connection string.
Returns
- string
A connection string.
GetStorageTables(params string[])
Returns information that describes the structures of the specified tables.
public DBTable[] GetStorageTables(params string[] tables)
Parameters
tables
string[]An array of table names identifying the tables whose information should be retrieved.
Returns
- DBTable[]
An array of DevExpress.Xpo.DB.DBTable objects that describe the structures of the requested tables.
GetStorageTablesList(bool)
Returns a list of the available tables in the data store.
public string[] GetStorageTablesList(bool includeViews)
Parameters
includeViews
booltrue, to include available database views in the resulting array; otherwise, false.
Returns
- string[]
An array of the table names in the data store.
ModifyData(params ModificationStatement[])
Updates data in a data store using the specified modification statements.
public ModificationResult ModifyData(params ModificationStatement[] dmlStatements)
Parameters
dmlStatements
ModificationStatement[]An array of data modification statements.
Returns
- ModificationResult
The result of the data modifications.
ModifyDataAsync(CancellationToken, params ModificationStatement[])
public Task<ModificationResult> ModifyDataAsync(CancellationToken cancellationToken, params ModificationStatement[] dmlStatements)
Parameters
cancellationToken
CancellationTokendmlStatements
ModificationStatement[]
Returns
- Task<ModificationResult>
Register()
Registers the provider for use with XPO.
public static void Register()
SelectData(params SelectStatement[])
Fetches data from a data store using the specified query statements.
public SelectedData SelectData(params SelectStatement[] selects)
Parameters
selects
SelectStatement[]An array of statements to obtain data from the data store.
Returns
- SelectedData
The data retrieved from the data store.
SelectDataAsync(CancellationToken, params SelectStatement[])
public Task<SelectedData> SelectDataAsync(CancellationToken cancellationToken, params SelectStatement[] selects)
Parameters
cancellationToken
CancellationTokenselects
SelectStatement[]
Returns
- Task<SelectedData>
UpdateSchema(bool, params DBTable[])
Updates the storage schema according to the specified class descriptions.
public UpdateSchemaResult UpdateSchema(bool doNotCreateIfFirstTableNotExist, params DBTable[] tables)
Parameters
doNotCreateIfFirstTableNotExist
booltrue if the schema should not be created when the table that corresponds to the first item in the tables array doesn’t exist in the data store.
tables
DBTable[]An array of tables whose structure should be saved in the data store.
Returns
- UpdateSchemaResult
A DevExpress.Xpo.DB.UpdateSchemaResult value that specifies the result of the update operation.
UpdateSchemaAsync(CancellationToken, bool, params DBTable[])
Asynchronously updates the storage schema according to the specified class descriptions.
public Task<UpdateSchemaResult> UpdateSchemaAsync(CancellationToken cancellationToken, bool doNotCreateIfFirstTableNotExist, params DBTable[] tables)
Parameters
cancellationToken
CancellationTokenA CancellationToken object that delivers a cancellation notice to the running operation.
doNotCreateIfFirstTableNotExist
booltrue if the schema should not be created when the table that corresponds to the first item in the tables array doesn’t exist in the data store.
tables
DBTable[]An array of tables whose structure should be saved in the data store.
Returns
- Task<UpdateSchemaResult>
A Task<TResult> that returns an DevExpress.Xpo.DB.UpdateSchemaResult value that specifies the result of the update operation.