Uknown COMException at execution of DTS-package -
05-14-2004
, 06:59 AM
Hello,
I've made a DTS-package, to synchronate 2 databases in SQL-Server
2000.
When I run the package in SQL-Server Enterprise Manager, execution
completes without errors.
However when I try to execute the package from C#, a COMExeption is
thrown:
message : "Exception from HRESULT: 0x80040427."
_HResult : -2147220441
_COMPlusExeptionCode : -532459699
This is the only information that the Exception contains, and when I
make a search on the web, I don't find any information about this
exception.
Does anyone has an idea, what could be the reason of the exception ??
Thanks in advance !
Koen Appeltans
here's my C# code :
Package2Class pkg = new Package2Class();
pkg.OnError += new PackageEvents_OnErrorEventHandler(pkg_OnError);
try
{
object pVarPersistStgOfHost = null;
pkg.LoadFromSQLServer("SDT_DESKTOP_003", "sa", "koen",
DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, null,
null,
null, "Coram Synchronisatie", ref pVarPersistStgOfHost);
pkg.GlobalVariables.Remove("gv_VertegenwoordigerID ");
pkg.GlobalVariables.AddGlobalVariable("gv_Vertegen woordigerID", 1);
pkg.Execute();
}
catch(System.Runtime.InteropServices.COMException ex)
{
throw new DTSErrorException(ex.Message);
}
finally
{
pkg.UnInitialize();
pkg = null;
} |