CreateForAttach Property (SQL-DMO)

The CreateForAttach property controls database file creation when the Database object is added to the Databases collection of a connected SQLServer object.

Applies To

Database Object

Syntax

object.CreateForAttach [= value]

Part Description
object Expression that evaluates to an object in the Applies To list
value True or False

Remarks

If True, the database is created from files specified in the FileGroups and LogFiles collections.

If False, data files are created as directed by the FileGroups and LogFiles collections.

Creating databases from existing data files is constrained. For more information, see CREATE DATABASE.

Data Type

Boolean

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetCreateForAttach(LPBOOL pRetVal);

HRESULT SetCreateForAttach(BOOL NewValue);

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.