EnumFileGroups Method (SQL-DMO)

The EnumFileGroups method returns a QueryResults object enumerating the filegroups of a Microsoft® SQL Server™ database.

Applies To

Database Object

Syntax

object.EnumFileGroups() as QueryResults

Part Description
object Expression that evaluates to an object in the Applies To list

Returns

A QueryResults object containing one result set defined by these columns.

Column Data type Description
groupid smallint System-generated filegroup identifier
allocpolicy smallint Reserved for future use
status integer Interpret as specified in Remarks
groupname nvarchar(129) Name of the filegroup

Remarks

Interpret the value of the status column by using these values.

Value Description
0 User-defined filegroup
8 Filegroup defined on files maintained on read-only media
16 Primary filegroup

Prototype (C/C++)

HRESULT EnumFileGroups(
LPSQLDMOQUERYRESULTS* ppResults);

  


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