Changeset 17de8d3def74…
Parent d9edefcfe934…
by
Changes to 5 files · Browse files at 17de8d3def74 Showing diff from parent d9edefcfe934 Diff from another changeset...
@@ -46,6 +46,15 @@ <DocumentationFile>bin\Migrator\Release\Migrator.XML</DocumentationFile>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="Microsoft.SqlServer.ConnectionInfo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
+ <HintPath>..\..\lib\Microsoft.SqlServer.ConnectionInfo.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.SqlServer.Management.Sdk.Sfc, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
+ <HintPath>..\..\lib\Microsoft.SqlServer.Management.Sdk.Sfc.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.SqlServer.Smo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
+ <HintPath>..\..\lib\Microsoft.SqlServer.Smo.dll</HintPath>
+ </Reference>
<Reference Include="MySql.Data, Version=5.0.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\..\lib\MySql.Data.dll</HintPath>
<Private>True</Private>
|
@@ -674,6 +674,21 @@ }
}
+ /// <summary>
+ /// This method can execute commands with "GO" separator
+ /// </summary>
+ /// <param name="sql"></param>
+ /// <returns></returns>
+ public virtual int ExecuteMSSQLBatch(string sql)
+ {
+ this.Logger.Trace(sql);
+ using (var connection = new System.Data.SqlClient.SqlConnection(this.ConnectionString))
+ {
+ var server = new Microsoft.SqlServer.Management.Smo.Server(new Microsoft.SqlServer.Management.Common.ServerConnection(connection));
+ return server.ConnectionContext.ExecuteNonQuery(sql);
+ }
+ }
+
/// <summary>
/// Execute a raw SQl statement that will not produce a result set (e.g. Update, Insert, Delete etc.)
/// </summary>
|
|
|
|
|
|
|
Loading...