Compartir a través de


Database.Create Method

Definition

Overloads

Create(Boolean)

Creates the database on the instance of SQL Server

Create()

Creates the database on the instance of SQL Server.

Create(Boolean)

Creates the database on the instance of SQL Server

public void Create (bool forAttach);
member this.Create : bool -> unit
Public Sub Create (forAttach As Boolean)

Parameters

forAttach
Boolean

When true, will create the database by attaching existing files. There must be at least one FileGroup with a valid DataFile for the attach to succeed.

Examples

var databaseAttach = new Database(server, dbName); databaseAttach.FileGroups.Add(new FileGroup(databaseAttach, "PRIMARY")); databaseAttach.FileGroups["PRIMARY"].Files.Add(new DataFile(databaseAttach.FileGroups["PRIMARY"], primaryName, primaryFileName)); databaseAttach.Create(forAttach:true);

Applies to

Create()

Creates the database on the instance of SQL Server.

public void Create ();
abstract member Create : unit -> unit
override this.Create : unit -> unit
Public Sub Create ()

Implements

Applies to