dbTalk Databases Forums  

DTS Interop question.

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


Discuss DTS Interop question. in the microsoft.public.sqlserver.dts forum.



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

Default DTS Interop question. - 08-24-2005 , 11:25 AM






Hi all,

(Note: I originally posted this in the
microsoft.public.dotnet.framework.interop newgroup, but got no response.
Thought I'd try here.)

I've created a .NET app that executes a DTS package. Everything works great
if I pass the appropriate parameters to the application; if I purposely pass
an incorrect parameter (such as a bad database server name) it seems that
the Execute call on the package goes off into lala-land, and never returns
with an error.

Here's some of the code I'm using:

Public goPackage As DTS.Package2

...

goPackage = New DTS.Package
goPackage.Name = "Name"
goPackage.Description = "Description"
goPackage.WriteCompletionStatusToNTEventLog = True
goPackage.FailOnError = True
goPackage.PackagePriorityClass = 2
goPackage.MaxConcurrentSteps = 4
goPackage.LineageOptions = 0
goPackage.UseTransaction = True
goPackage.TransactionIsolationLevel = 4096
goPackage.AutoCommitTransaction = True
goPackage.RepositoryMetadataOptions = 0
goPackage.UseOLEDBServiceComponents = True
goPackage.LogToSQLServer = False
goPackage.LogServerFlags = 0
goPackage.FailPackageOnLogFailure = False
goPackage.ExplicitGlobalVariables = False
goPackage.PackageType = 0

...

goPackage.Execute()
tracePackageError(goPackage)
goPackage.UnInitialize()

Has anyone else seen this behavior? Is there a way that I can keep this
from occuring?

This DTS application will be called by a separate process, and I'd like for
that process to receive an error if something goes wrong and a bad parameter
is passed.

Thanks!

Wade





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

Default Re: DTS Interop question. - 08-24-2005 , 02:23 PM






Have you studied Gert's paper?
http://www.sqldev.net/dts/DotNETCookBook.htm


"Wade" <wwegner23NOEMAILhotmail.com> wrote

Quote:
Hi all,

(Note: I originally posted this in the
microsoft.public.dotnet.framework.interop newgroup, but got no response.
Thought I'd try here.)

I've created a .NET app that executes a DTS package. Everything works
great
if I pass the appropriate parameters to the application; if I purposely
pass
an incorrect parameter (such as a bad database server name) it seems that
the Execute call on the package goes off into lala-land, and never returns
with an error.

Here's some of the code I'm using:

Public goPackage As DTS.Package2

...

goPackage = New DTS.Package
goPackage.Name = "Name"
goPackage.Description = "Description"
goPackage.WriteCompletionStatusToNTEventLog = True
goPackage.FailOnError = True
goPackage.PackagePriorityClass = 2
goPackage.MaxConcurrentSteps = 4
goPackage.LineageOptions = 0
goPackage.UseTransaction = True
goPackage.TransactionIsolationLevel = 4096
goPackage.AutoCommitTransaction = True
goPackage.RepositoryMetadataOptions = 0
goPackage.UseOLEDBServiceComponents = True
goPackage.LogToSQLServer = False
goPackage.LogServerFlags = 0
goPackage.FailPackageOnLogFailure = False
goPackage.ExplicitGlobalVariables = False
goPackage.PackageType = 0

...

goPackage.Execute()
tracePackageError(goPackage)
goPackage.UnInitialize()

Has anyone else seen this behavior? Is there a way that I can keep this
from occuring?

This DTS application will be called by a separate process, and I'd like
for
that process to receive an error if something goes wrong and a bad
parameter
is passed.

Thanks!

Wade







Reply With Quote
  #3  
Old   
Wade
 
Posts: n/a

Default Re: DTS Interop question. - 08-29-2005 , 10:31 AM



No, I haven't -- I'll take a look. Thanks.

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
Have you studied Gert's paper?
http://www.sqldev.net/dts/DotNETCookBook.htm


"Wade" <wwegner23NOEMAILhotmail.com> wrote in message
news:%23vEzsfMqFHA.3724 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Hi all,

(Note: I originally posted this in the
microsoft.public.dotnet.framework.interop newgroup, but got no response.
Thought I'd try here.)

I've created a .NET app that executes a DTS package. Everything works
great
if I pass the appropriate parameters to the application; if I purposely
pass
an incorrect parameter (such as a bad database server name) it seems that
the Execute call on the package goes off into lala-land, and never
returns
with an error.

Here's some of the code I'm using:

Public goPackage As DTS.Package2

...

goPackage = New DTS.Package
goPackage.Name = "Name"
goPackage.Description = "Description"
goPackage.WriteCompletionStatusToNTEventLog = True
goPackage.FailOnError = True
goPackage.PackagePriorityClass = 2
goPackage.MaxConcurrentSteps = 4
goPackage.LineageOptions = 0
goPackage.UseTransaction = True
goPackage.TransactionIsolationLevel = 4096
goPackage.AutoCommitTransaction = True
goPackage.RepositoryMetadataOptions = 0
goPackage.UseOLEDBServiceComponents = True
goPackage.LogToSQLServer = False
goPackage.LogServerFlags = 0
goPackage.FailPackageOnLogFailure = False
goPackage.ExplicitGlobalVariables = False
goPackage.PackageType = 0

...

goPackage.Execute()
tracePackageError(goPackage)
goPackage.UnInitialize()

Has anyone else seen this behavior? Is there a way that I can keep this
from occuring?

This DTS application will be called by a separate process, and I'd like
for
that process to receive an error if something goes wrong and a bad
parameter
is passed.

Thanks!

Wade









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.