dbTalk Databases Forums  

Uknown COMException at execution of DTS-package

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Uknown COMException at execution of DTS-package in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Koen Appeltans
 
Posts: n/a

Default 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;
}

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.