다음을 통해 공유


EnumAvailableMedia Method

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 않도록 하고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

The EnumAvailableMedia method returns a QueryResults object that enumerates media visible by an instance of Microsoft SQL Server.

구문

object.EnumAvailableMedia( [ MediaType ] )as QueryResults

Parts

  • object
    Expression that evaluates to an object in the Applies To list.

  • MediaType
    Long integer that optionally restricts output as described in Settings.

Prototype (C/C++)

HRESULT EnumAvailableMedia(
LPSQLDMOQUERYRESULTS* ppResults,
SQLDMO_MEDIA_TYPE MediaType = SQLDMOMedia_All);

Settings

Set the optional MediaType parameter using these SQLDMO_MEDIA_TYPE values.

Constant

Value

Description

SQLDMOMedia_All

15

Default. List all media.

SQLDMOMedia_CDROM

8

List visible CD-ROM devices.

SQLDMOMedia_FixedDisk

2

List visible fixed disk drive devices.

SQLDMOMedia_Floppy

1

List visible floppy disk drive devices.

SQLDMOMedia_SharedFixedDisk

16

List visible fixed disk drive devices shared on a clustered computer.

SQLDMOMedia_Tape

4

List visible tape devices.

Returns

A QueryResults object that contains one result set defined by these columns.

Column

Data type

Description

name

nvarchar(256)

Mapped name of the media.

low free

integer

Interpreted as an unsigned value. Low-order double word of available media resource.

high free

integer

Interpreted as an unsigned value. High order double word of available media resource.

media type

tinyint

Interpreted using the SQL-DMO enumerated data type SQLDMO_MEDIA_TYPE.

주의

The SQLDMOMedia_SharedFixedDisk constant is only valid when used with an instance of SQL Server 2000 or later.

Applies To: