'Declaration Public Overridable Property ScriptText As String
public virtual string ScriptText {get; set;}
'Declaration Public Overridable Property ScriptText As String
public virtual string ScriptText {get; set;}
When you assign value to ScriptText the following actions take place. First, if Statements property had been used before to obtain a SqlStatementCollection object, this collection gets cleared and no SqlStatement objects associated with obsolete script can be used. Second, DbScript positions itself on the first statement in the script, thus next invocation of ExecuteNext method will execute the first SQL statement regardless of whether it had been called before.
Note that large scripts a better handled with Open method.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2