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.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for