dbTalk Databases Forums  

Disconnect DB Connection in ActiveX Script Step

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


Discuss Disconnect DB Connection in ActiveX Script Step in the microsoft.public.sqlserver.dts forum.



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

Default Disconnect DB Connection in ActiveX Script Step - 03-04-2005 , 06:59 AM






Hi there,
I have written a DTS package that ends with an ActiveX Script
step to rename the Access database file that the package imports from.
Executing each step works fine but when I run the whole package, the final
step fails, presumably because the Access database is still open. Is there
a was to reference the connections in the script so that I can disconnect it
first?

Regards,

Waldy.



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

Default Re: Disconnect DB Connection in ActiveX Script Step - 03-04-2005 , 07:30 AM






In the workflow properties of the DataPump task you can "Close
Connection on completion"



"Waldy" <waldy (AT) notmail (DOT) com> wrote


Quote:
Hi there,
I have written a DTS package that ends with an ActiveX Script
step to rename the Access database file that the package imports from.
Executing each step works fine but when I run the whole package, the final
step fails, presumably because the Access database is still open. Is there
a was to reference the connections in the script so that I can disconnect it
first?

Regards,

Waldy.


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

Default Re: Disconnect DB Connection in ActiveX Script Step - 03-04-2005 , 08:17 AM



O.K. Thanks for that. I have four datapump tasks though, how do I know
which one will be executed last?


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

Quote:
In the workflow properties of the DataPump task you can "Close Connection
on completion"



"Waldy" <waldy (AT) notmail (DOT) com> wrote


Hi there,
I have written a DTS package that ends with an ActiveX
Script
step to rename the Access database file that the package imports from.
Executing each step works fine but when I run the whole package, the
final
step fails, presumably because the Access database is still open. Is
there
a was to reference the connections in the script so that I can disconnect
it
first?

Regards,

Waldy.




Reply With Quote
  #4  
Old   
Waldy
 
Posts: n/a

Default Re: Disconnect DB Connection in ActiveX Script Step - 03-04-2005 , 08:24 AM



What connection does the Close Connection on Completion close? Source,
destination or both?



Reply With Quote
  #5  
Old   
Simon Worth
 
Posts: n/a

Default Re: Disconnect DB Connection in ActiveX Script Step - 03-04-2005 , 08:30 AM



You can control the flow of data pump tasks within DTS using workflow
properties. There you can specify what data pump goes first, second, third,
and so on. This way you can control what task fires last, and be sure the
connection is closed once complete.

"Waldy" <waldy (AT) notmail (DOT) com> wrote

Quote:
O.K. Thanks for that. I have four datapump tasks though, how do I know
which one will be executed last?


"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message
news:eUUbs2LIFHA.3500 (AT) TK2MSFTNGP14 (DOT) phx.gbl...
In the workflow properties of the DataPump task you can "Close
Connection
on completion"



"Waldy" <waldy (AT) notmail (DOT) com> wrote


Hi there,
I have written a DTS package that ends with an ActiveX
Script
step to rename the Access database file that the package imports from.
Executing each step works fine but when I run the whole package, the
final
step fails, presumably because the Access database is still open. Is
there
a was to reference the connections in the script so that I can
disconnect
it
first?

Regards,

Waldy.






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

Default Re: Disconnect DB Connection in ActiveX Script Step - 03-04-2005 , 08:40 AM



You control the flow using precedence constraints

Introduction to Workflow
(http://www.sqldts.com/default.aspx?287)



"Waldy" <waldy (AT) notmail (DOT) com> wrote


Quote:
O.K. Thanks for that. I have four datapump tasks though, how do I know
which one will be executed last?


"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message
news:eUUbs2LIFHA.3500 (AT) TK2MSFTNGP14 (DOT) phx.gbl...
In the workflow properties of the DataPump task you can "Close Connection
on completion"



"Waldy" <waldy (AT) notmail (DOT) com> wrote


Hi there,
I have written a DTS package that ends with an ActiveX
Script
step to rename the Access database file that the package imports from.
Executing each step works fine but when I run the whole package, the
final
step fails, presumably because the Access database is still open. Is
there
a was to reference the connections in the script so that I can disconnect
it
first?

Regards,

Waldy.



Reply With Quote
  #7  
Old   
Waldy
 
Posts: n/a

Default Re: Disconnect DB Connection in ActiveX Script Step - 03-04-2005 , 10:55 AM



"Simon Worth" <REMOVEFIRST_simon.worth (AT) gmail (DOT) com> wrote

Quote:
You can control the flow of data pump tasks within DTS using workflow
properties. There you can specify what data pump goes first, second,
third,
and so on. This way you can control what task fires last, and be sure the
connection is closed once complete.
Hi Simon,
I cant find where you do this. Can you point me in the
right direction?

Thanks.




Reply With Quote
  #8  
Old   
Simon Worth
 
Posts: n/a

Default Re: Disconnect DB Connection in ActiveX Script Step - 03-04-2005 , 11:10 AM



So I assume you have 2 connection objects, and between those 2 connection
objects you have 4 data transformation tasks. Right click on the first
transformation task and click on "Workflow Properties". This brings up the
workflow properties dialog box. This is where you specify the execution
sequence.
You should only have 1 entry in there now for "Source Step, Presedence,
Desitination Step".
Click the add button at the bottom, and add the next source step (your
second data transformation task), assign the presedence - I assume you want
"Success", then assign the destination. Do this for the other 2 as well,
and if you have defined them properly, the data pump task will execute in
that order.

Does that make sense?


--
Simon Worth


"Waldy" <waldy (AT) notmail (DOT) com> wrote

Quote:
"Simon Worth" <REMOVEFIRST_simon.worth (AT) gmail (DOT) com> wrote in message
news:OOub7aMIFHA.2476 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
You can control the flow of data pump tasks within DTS using workflow
properties. There you can specify what data pump goes first, second,
third,
and so on. This way you can control what task fires last, and be sure
the
connection is closed once complete.

Hi Simon,
I cant find where you do this. Can you point me in the
right direction?

Thanks.





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 - 2013, Jelsoft Enterprises Ltd.