Back to Devexpress

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

corelibraries-devexpress-dot-xpo-dot-db-dot-datastorebase-dot-querydatastore-x28-system-dot-string-system-dot-string-devexpress-dot-xpo-dot-db-dot-autocreateoption-system-dot-idisposable-x29.md

latest3.5 KB
Original Source

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

Creates a data store based on specified settings.

Namespace : DevExpress.Xpo.DB

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
public static IDataStore QueryDataStore(
    string providerType,
    string connectionString,
    AutoCreateOption defaultAutoCreateOption,
    out IDisposable[] objectsToDisposeOnDisconnect
)
vb
Public Shared Function QueryDataStore(
    providerType As String,
    connectionString As String,
    defaultAutoCreateOption As AutoCreateOption,
    ByRef objectsToDisposeOnDisconnect As IDisposable()
) As IDataStore

Parameters

NameTypeDescription
providerTypeString

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

TypeDescription
IDataStore

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

|

See Also

AccessConnectionProvider.XpoProviderTypeString

AccessConnectionProviderMultiUserThreadSafe.XpoProviderTypeString

InMemoryDataStore.XpoProviderTypeString

MSSqlConnectionProvider.XpoProviderTypeString

XpoProviderTypeString_CacheRoot

XpoProviderTypeString_WithCache

DataStoreBase Class

DataStoreBase Members

DevExpress.Xpo.DB Namespace