DataFile Constructor (FileGroup, String)
Initializes a new instance of the DataFile class on the specified file group with the specified 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 _
)
public DataFile (
FileGroup fileGroup,
string name
)
public:
DataFile (
FileGroup^ fileGroup,
String^ name
)
public DataFile (
FileGroup fileGroup,
String name
)
public function DataFile (
fileGroup : FileGroup,
name : 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.
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)