Home > Archive > MS SQL Server DTS > January 2006 > DTS OnProgress and OnError events do not fire when called from ASP.NET









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

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

2006-01-18, 11:24 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...
Allan Mitchell

2006-01-18, 8:24 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



> 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...
>



Peter Yang [MSFT]

2006-01-19, 3:24 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/d...-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.


--------------------
>Date: Wed, 18 Jan 2006 16:55:57 +0000
>From: Nick Gilbert <NickG@newsgroup.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@tk2msftngp13.phx.gbl>
>Newsgroups:

microsoft.public.sqlserver.dts,microsoft.public.dotnet.framework. aspnet
>NNTP-Posting-Host: neon.staging.x-rm.com 195.166.37.20
>Lines: 1
>Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
>Xref: TK2MSFTNGXA02.phx.gbl

microsoft.public.dotnet.framework.aspnet:371798
microsoft.public.sqlserver. dts:63187
>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...
>


Peter Yang [MSFT]

2006-01-20, 9:23 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,
DTSSQLServerStorageF
lags. DTSSQLStgFlag_UseTru
stedConnection, null,
null, null, "Test", ref pVarPersistStgOfHost
);

package.LoadFromSQLServer("localhost", null, null,
DTSSQLServerStorageF
lags. DTSSQLStgFlag_UseTru
stedConnection, 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.


--------------------
>Date: Thu, 19 Jan 2006 12:21:08 +0000
>From: Nick Gilbert <NickG@newsgroup.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@tk2msftngp13.phx.gbl>

<Bgq53WNHGHA.3680@TK2MSFTNGXA02.phx.gbl>
>In-Reply-To: <Bgq53WNHGHA.3680@TK2MSFTNGXA02.phx.gbl>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>Content-Transfer-Encoding: 7bit
>Message-ID: <#3JEVLPHGHA.1452@TK2MSFTNGP11.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!TK2MSFTNGP11.phx.gbl
>Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.dts:63223
>X-Tomcat-NG: microsoft.public.sqlserver.dts
>
Also,[color=darkred]

>
>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...
>


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com