Database.Open(String) Method

Definition

Opens a connection to a database using the specified file name or using the named connection string.

public static WebMatrix.Data.Database Open (string name);
static member Open : string -> WebMatrix.Data.Database
Public Shared Function Open (name As String) As Database

Parameters

name
String

The name associated with the database to open. name can specify an .sdf or .mdf database file that is in the App_Data folder. (Do not include the file-name extension.) Alternatively, name can specify the name of a connection string in the Web.config file.

Returns

The database instance.

Applies to