ScriptFactory.CreateNewScript Method (String, IVsProject, UIConnectionGroupInfo, IDbConnection, String)
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, _
connectionInfoList As UIConnectionGroupInfo, _
liveCon As IDbConnection, _
rootName As String _
) As Object
'Usage
Dim instance As ScriptFactory
Dim strFullPathToScript As String
Dim projectToAddScriptTo As IVsProject
Dim connectionInfoList As UIConnectionGroupInfo
Dim liveCon As IDbConnection
Dim rootName As String
Dim returnValue As Object
returnValue = instance.CreateNewScript(strFullPathToScript, _
projectToAddScriptTo, connectionInfoList, _
liveCon, rootName)
public Object CreateNewScript(
string strFullPathToScript,
IVsProject projectToAddScriptTo,
UIConnectionGroupInfo connectionInfoList,
IDbConnection liveCon,
string rootName
)
public:
Object^ CreateNewScript(
String^ strFullPathToScript,
IVsProject^ projectToAddScriptTo,
UIConnectionGroupInfo^ connectionInfoList,
IDbConnection^ liveCon,
String^ rootName
)
member CreateNewScript :
strFullPathToScript:string *
projectToAddScriptTo:IVsProject *
connectionInfoList:UIConnectionGroupInfo *
liveCon:IDbConnection *
rootName:string -> Object
public function CreateNewScript(
strFullPathToScript : String,
projectToAddScriptTo : IVsProject,
connectionInfoList : UIConnectionGroupInfo,
liveCon : IDbConnection,
rootName : String
) : 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.
- connectionInfoList
Type: Microsoft.SqlServer.Management.Smo.RegSvrEnum.UIConnectionGroupInfo
A UIConnectionGroupInfo that can be passed in to the new editor. If null, then new editor doesn't have any connection associated with it.
- 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.
- rootName
Type: System.String
A string value that specifies the root name corresponding to file extension.
Return Value
Type: System.Object
The document view Object for the new script editor.
See Also
Reference
Microsoft.SqlServer.Management.UI.VSIntegration.Editors Namespace