Script Method

Description

Generates a series of Transact-SQL statements (script) to create the underlying device.

Visual Basic

strScript = Device.Script (
[[ScriptType :=] tScriptType,]
[[ScriptFilePath :=] strFile,]
[[NewPhysicalLocation :=] strNewDeviceFile] )

C++

HRESULT pDevice->Script (
SQLOLE_SCRIPT_TYPE
tScriptType = SQLOLEScript_Default,
SQLOLE_LPCSTR
strFile = NULL,
SQLOLE_LPCSTR
strNewDeviceFile = NULL,
SQLOLE_LPBSTR
pstrScript = NULL );

Elements


Element Type Description

strScript String Generated Transact-SQL script
tScriptType SQLOLE_SCRIPT_TYPE Type of script to generate
strFile String Full path and filename to use to store the Transact-SQL script
strNewDeviceFile String New full path and filename of the new physical device file this script will create

Remarks

The generated Transact-SQL script can be used for database recovery.