Script Method

SQLServer.Login Object

Description

Produces a Transact-SQL script that can be used to create the login.

Visual Basic

strSQLScript = Login.Script (
[ScriptType :=] tScriptOptions,
[[ScriptFilePath :=] strFile] )

C++

HRESULT pLogin->Script (
SQLOLE_SCRIPT_TYPE
tScriptOptions = SQLOLEScript_Default,
SQLOLE_LPCSTR strFile = NULL,
SQLOLE_LPBSTR pstrSQLScript = NULL );

Elements

Element Type Description

strSQLScript String Returned Transact-SQL script to create the login
tScriptOptions SQLOLE_SCRIPT_TYPE Script options
strFile String Full path and filename of Transact-SQL script file to create