ScriptFactory.CreateNewScript Method (String, IVsProject, UIConnectionInfo, IDbConnection)


Creates and opens new blank script of specified file and adds it to the specified project.

Namespace:   Microsoft.SqlServer.Management.UI.VSIntegration.Editors
Assembly:  SQLEditors (in SQLEditors.dll)

public object CreateNewScript(
	string strFullPathToScript,
	IVsProject projectToAddScriptTo,
	UIConnectionInfo ci,
	IDbConnection liveCon


Type: System.String

A string value that specifies the full path to the script.

Type: Microsoft.VisualStudio.Shell.Interop.IVsProject

A T:Microsoft.Microsoft.VisualStudio.Shell.Interop.IVsProject that is currently loaded.

Type: Microsoft.SqlServer.Management.Smo.RegSvrEnum.UIConnectionInfo

A UIConnectionInfo that can be passed in to the new editor. If null, then new editor doesn't have any connection associated with it.

Type: System.Data.IDbConnection

A T: System.Data.IDbConnection that can be associated with the new editor. Can be non-null only if connectionInfoList parameter is non-null/non-empty. Should be in sync with connectionInfoList parameter.

Return Value

Type: System.Object

The document view Object for the new script editor.

Return to top