InterOpPermission interOp = new InterOpPermission(InterOpKind::ClrInterop);
Microsoft.SqlServer.Dts.Runtime.Application app;
Microsoft.SqlServer.Dts.Runtime.Package pkg;
Microsoft.SqlServer.Dts.Runtime.IDTSEvents event;
Microsoft.SqlServer.Dts.Runtime.DTSExecResult result;
;
interOp.assert();
event = CLRInterop::Null("Microsoft.SqlServer.Dts.Runtime.IDTSEvents");
app = new Microsoft.SqlServer.Dts.Runtime.Application();
pkg = app.LoadFromSqlServer("InventTable","","","",event);
result = pkg.Execute();
if(result == Microsoft.SqlServer.Dts.Runtime.DTSExecResult::Success)
box::info("Success!");
else
if(result == Microsoft.SqlServer.Dts.Runtime.DTSExecResult::Failure)
box::info("failure!");
else
box::info("I don't know!");
CodeAccessPermission::revertAssert();