Skip to main content

DataStoreBase.QueryDataStore(String, String, AutoCreateOption, out IDisposable[]) Method

Creates a data store based on specified settings.

Namespace: DevExpress.Xpo.DB

Assembly: DevExpress.Data.v24.1.dll

NuGet Package: DevExpress.Data

Declaration

public static IDataStore QueryDataStore(
    string providerType,
    string connectionString,
    AutoCreateOption defaultAutoCreateOption,
    out IDisposable[] objectsToDisposeOnDisconnect
)

Parameters

Name Type Description
providerType String

A String specifying the provider type. Normally, each provider returns its type via the XpoProviderTypeString property.

connectionString String

The connection string which is used to instantiate a connection provider.

defaultAutoCreateOption AutoCreateOption

An AutoCreateOption enumeration value which specifies the action which is performed when connecting to the created data store. The specified value initializes the data store’s IDataStore.AutoCreateOption property.

objectsToDisposeOnDisconnect IDisposable[]

An array of objects that implement the System.IDisposable interface. These objects are automatically disposed of when the created data store is disconnected.

Returns

Type Description
IDataStore

A data store implementing the IDataStore interface, which uses the connection to access a database.

See Also