Share via


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)

Syntax

'Declaration
Public Function CreateNewScript ( _
    strFullPathToScript As String, _
    projectToAddScriptTo As IVsProject, _
    ci As UIConnectionInfo, _
    liveCon As IDbConnection _
) As Object
'Usage
Dim instance As ScriptFactory 
Dim strFullPathToScript As String 
Dim projectToAddScriptTo As IVsProject 
Dim ci As UIConnectionInfo 
Dim liveCon As IDbConnection 
Dim returnValue As Object 

returnValue = instance.CreateNewScript(strFullPathToScript, _
    projectToAddScriptTo, ci, liveCon)
public Object CreateNewScript(
    string strFullPathToScript,
    IVsProject projectToAddScriptTo,
    UIConnectionInfo ci,
    IDbConnection liveCon
)
public:
Object^ CreateNewScript(
    String^ strFullPathToScript, 
    IVsProject^ projectToAddScriptTo, 
    UIConnectionInfo^ ci, 
    IDbConnection^ liveCon
)
member CreateNewScript : 
        strFullPathToScript:string * 
        projectToAddScriptTo:IVsProject * 
        ci:UIConnectionInfo * 
        liveCon:IDbConnection -> Object
public function CreateNewScript(
    strFullPathToScript : String, 
    projectToAddScriptTo : IVsProject, 
    ci : UIConnectionInfo, 
    liveCon : IDbConnection
) : Object

Parameters

  • strFullPathToScript
    Type: System.String
    A string value that specifies the full path to the script.
  • projectToAddScriptTo
    Type: IVsProject
    A IVsProject that is currently loaded.
  • liveCon
    Type: System.Data.IDbConnection
    A 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.

See Also

Reference

ScriptFactory Class

CreateNewScript Overload

Microsoft.SqlServer.Management.UI.VSIntegration.Editors Namespace