dbTalk Databases Forums  

DTS OnProgress and OnError events do not fire when called from ASP.NET

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


Discuss DTS OnProgress and OnError events do not fire when called from ASP.NET in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nick Gilbert
 
Posts: n/a

Default DTS OnProgress and OnError events do not fire when called from ASP.NET - 01-18-2006 , 10:55 AM






Hi,

I'm using the following code to execute a DTS package from .NET:

http://support.microsoft.com/?kbid=319985

However when I run my package from ASP.NET, only the OnQueryCancel event
seems to fire. The OnProgress and OnError events do not fire. If I cause
an error on purpose, a COMException is thrown.

I would really like to handle the OnProgress and OnError events. Can
somebody please tell me if there is a way to get these to work.

Thanks,

Nick...

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS OnProgress and OnError events do not fire when called from ASP.NET - 01-18-2006 , 02:59 PM






Hello Nick,

Whenever I want to fire a package from .Net and get some of the funky stuff
back I head over to Gert's site and he generally has something I need. Maybe
it will help you

www.SQLDEV.net


Allan



Quote:
Hi,

I'm using the following code to execute a DTS package from .NET:

http://support.microsoft.com/?kbid=319985

However when I run my package from ASP.NET, only the OnQueryCancel
event seems to fire. The OnProgress and OnError events do not fire. If
I cause an error on purpose, a COMException is thrown.

I would really like to handle the OnProgress and OnError events. Can
somebody please tell me if there is a way to get these to work.

Thanks,

Nick...




Reply With Quote
  #3  
Old   
Peter Yang [MSFT]
 
Posts: n/a

Default RE: DTS OnProgress and OnError events do not fire when called from ASP.NET - 01-19-2006 , 02:52 AM



Hello Allan,

First, I'd like to confirm if the issue occurs for all DTS package. Also,
I'd like to know if you rasise OnProgress event in the custom task

http://msdn.microsoft.com/library/de...us/dtsprog/dts
pcust_4ror.asp

Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

================================================== ===



This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
Quote:
Date: Wed, 18 Jan 2006 16:55:57 +0000
From: Nick Gilbert <NickG (AT) newsgroup (DOT) nospam
User-Agent: Thunderbird 1.5 (Windows/20051201)
MIME-Version: 1.0
Subject: DTS OnProgress and OnError events do not fire when called from
ASP.NET
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <ufqiOAFHGHA.208 (AT) tk2msftngp13 (DOT) phx.gbl
Newsgroups:
microsoft.public.sqlserver.dts,microsoft.public.do tnet.framework.aspnet
NNTP-Posting-Host: neon.staging.x-rm.com 195.166.37.20
Lines: 1
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msft ngp13.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:371798
microsoft.public.sqlserver.dts:63187
Quote:
X-Tomcat-NG: microsoft.public.sqlserver.dts

Hi,

I'm using the following code to execute a DTS package from .NET:

http://support.microsoft.com/?kbid=319985

However when I run my package from ASP.NET, only the OnQueryCancel event
seems to fire. The OnProgress and OnError events do not fire. If I cause
an error on purpose, a COMException is thrown.

I would really like to handle the OnProgress and OnError events. Can
somebody please tell me if there is a way to get these to work.

Thanks,

Nick...



Reply With Quote
  #4  
Old   
Nick Gilbert
 
Posts: n/a

Default Re: DTS OnProgress and OnError events do not fire when called fromASP.NET - 01-19-2006 , 06:21 AM



Quote:
First, I'd like to confirm if the issue occurs for all DTS package. Also,
I'd like to know if you rasise OnProgress event in the custom task
I'm not sure I'm using a "custom task". I just created the DTS package
manually by creating Data Transform tasks and workflow steps. I do get
progress when I execute it manually from within enterprise manager.

Nick...


Reply With Quote
  #5  
Old   
Peter Yang [MSFT]
 
Posts: n/a

Default Re: DTS OnProgress and OnError events do not fire when called from ASP.NET - 01-20-2006 , 08:34 AM



Hello Nick,

I tried to reproduce the issue on my side and I was not able to reproduce
the issue with the following steps:

1. Create a simple DTS job to import data from a excel file to a SQL table.

2. Create a .net console project in VS.net 2003.

3. Add the refer to Microsoft DTS Microsoft DTSPackage Object Library
version 2.0 COM object

4. Use the class ExecPkgWithEvents to replace the class created by VS.net

5. Change the server name to localhost, and DTS package name to test2 ( my
test package name)

package.LoadFromSQLServer("PNXDEVBOX", null, null,
DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrustedC onnection, null,
null, null, "Test", ref pVarPersistStgOfHost);

package.LoadFromSQLServer("localhost", null, null,
DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrustedC onnection, null,
null, null, "Test2", ref pVarPersistStgOfHost);

6. Build and execute the package and I could see the following events log
written into command prompt window in sequence:

onStart
onQueryCandel
OnProgress
OnQueryCancel
OnFinish
OnQueryCancel

I suggest that you try this step on a simple DTS package and then on a
different machine with VS.net installed to narrow down the issue.

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

================================================== ===



This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
Quote:
Date: Thu, 19 Jan 2006 12:21:08 +0000
From: Nick Gilbert <NickG (AT) newsgroup (DOT) nospam
User-Agent: Thunderbird 1.5 (Windows/20051201)
MIME-Version: 1.0
Subject: Re: DTS OnProgress and OnError events do not fire when called from
ASP.NET
References: <ufqiOAFHGHA.208 (AT) tk2msftngp13 (DOT) phx.gbl
Bgq53WNHGHA.3680 (AT) TK2MSFTNGXA02 (DOT) phx.gbl
In-Reply-To: <Bgq53WNHGHA.3680 (AT) TK2MSFTNGXA02 (DOT) phx.gbl
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <#3JEVLPHGHA.1452 (AT) TK2MSFTNGP11 (DOT) phx.gbl
Newsgroups: microsoft.public.sqlserver.dts
NNTP-Posting-Host: neon.staging.x-rm.com 195.166.37.20
Lines: 1
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP11.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.dts:63223
X-Tomcat-NG: microsoft.public.sqlserver.dts

First, I'd like to confirm if the issue occurs for all DTS package.
Also,
I'd like to know if you rasise OnProgress event in the custom task

I'm not sure I'm using a "custom task". I just created the DTS package
manually by creating Data Transform tasks and workflow steps. I do get
progress when I execute it manually from within enterprise manager.

Nick...



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.