SpaceAllocatedOnDevice Method

SQLServer.Database Object

Description

Returns the total amount of storage space this database has allocated on the specified device.

Visual Basic

lAllocated = Database.SpaceAllocatedOnDevice ( [DeviceName :=] idDevice )

C++

HRESULT pDatabase->GetSpaceAllocatedOnDevice (
SQLOLE_LPCSTR
idDevice,
LPLONG
plAllocated );

Elements

Element Type Description

lAllocated Long Total allocated storage space in megabytes
idDevice Identifier Device name

Remarks

This is an indexed property.