Database.Open(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.