Script Method

SQLServer.Database.Table Object

Description

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

Visual Basic

strScript = Table.Script (
[[ScriptType :=] tScriptType,]
[[ScriptFilePath :=] strFile,]
[[NewName :=] strNewName] )

C++

HRESULT pTable->Script (
SQLOLE_SCRIPT_TYPE
tScriptType = SQLOLEScript_Default,
SQLOLE_LPCSTR
strFile = NULL,
SQLOLE_LPCSTR
strNewName = 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 file name to use to store the Transact-SQL script
strNewName Identifier A new table name if desired