Partilhar via


DataFile Constructor (FileGroup, String, String)

Initializes a new instance of the DataFile class on the specified file group with the specified name and file name.

Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntax

'Declaration
Public Sub New ( _
    fileGroup As FileGroup, _
    name As String, _
    fileName As String _
)
public DataFile (
    FileGroup fileGroup,
    string name,
    string fileName
)
public:
DataFile (
    FileGroup^ fileGroup, 
    String^ name, 
    String^ fileName
)
public DataFile (
    FileGroup fileGroup, 
    String name, 
    String fileName
)
public function DataFile (
    fileGroup : FileGroup, 
    name : String, 
    fileName : String
)

Parameters

  • fileGroup
    A FileGroup object value that specifies the file group to which this data file belongs.
  • name
    A String value that specifies the name of the data file.
  • fileName
    A String value that specifies the file name of the data file.

Remarks

This namespace, class, or member is supported only in version 2.0 of the Microsoft .NET Framework.

Example

How to: Add FileGroups and DataFiles to a Database in Visual Basic .NET

Platforms

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

See Also

Reference

DataFile Class
DataFile Members
Microsoft.SqlServer.Management.Smo Namespace

Other Resources

Using Filegroups and Files to Store Data
Physical Database Files and Filegroups
CREATE DATABASE (Transact-SQL)