.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
The page you are viewing does not exist in the .NET Standard 2.0+ platform documentation. This link will take you to the parent topic of the current section.

AccessConnectionProviderMultiUserThreadSafe.GetConnectionString(String) Method

Returns a connection string to the specified MS Access data base.

Namespace: DevExpress.Xpo.DB

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public static string GetConnectionString(
    string database
)
Public Shared Function GetConnectionString(
    database As String
) As String

Parameters

Name Type Description
database String

A string that specifies the path and name of the data base to connect to.

Returns

Type Description
String

A connection string.

Remarks

The value returned by this method can be used to initialize a Session's connection string (for instance, via the Session.ConnectionString or XpoDefault.ConnectionString property).

The database parameter specifies the name of the database. If the full path is omitted, it is assumed that the database resides in the same folder as the application's executable file.

This method sets the connection string's "User ID" field to "Admin", and the password to an empty string.

Note

The string returned by the GetConnectionString method contains an extra parameter that identifies the database type to which a connection should be established, so it's not fully compatible with the standard connection string format. When a Session receives this connection string it removes this extra parameter and then passes the valid connection string to the database.

See Also