次の方法で共有


CreateForAttach Property

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションは修正することを検討してください。

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

構文

object.CreateForAttach [=value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list
  • value
    TRUE or FALSE

Data Type

Boolean

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetCreateForAttach(LPBOOL pRetVal);
HRESULT SetCreateForAttach(BOOL NewValue);

解説

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 (Transact-SQL).

ms143936.note(ja-jp,SQL.90).gifメモ :
CreateForAttach can only be set when the database is initially created.

Applies To:

Database Object