Home > Archive > MS SQL Server DTS > July 2005 > How to launch a process synchronously in my DTS









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 How to launch a process synchronously in my DTS
J-T

2005-07-25, 8:29 pm

I am calling a WINZIP process to extract a zipped file using the code below
:

Set oShell = CreateObject("WScript.Shell")
strCommand = "WZUNZIP.EXE" & " -e -o- " &
DTSGlobalVariables("gLocalImportFolder").Value & "\" & file & " " &
strTempUnZipFolder
oShell.Run strCommand

The problem is that I am calling this process several times by iterating
through a collection of zipped files and because the process is called
asynchronously inside the iteration when the process is called whilst the
unzipping process is not finished the control gose to the next commad which
is moving the file to another folder and it is causing me a problem.


Is there a workaround for this?

Thanks


Darren Green

2005-07-26, 3:24 am

Run Method
(http://msdn.microsoft.com/library/d...ml/wsmthrun.asp)


Look at the bWaitOnReturn parameter.


--
Darren Green
http://www.sqldts.com
http://www.sqlis.com

"J-T" <J-T@nospam.com> wrote in message
news:Ovb5TQWkFHA.3960@TK2MSFTNGP12.phx.gbl...
>I am calling a WINZIP process to extract a zipped file using the code below
>:
>
> Set oShell = CreateObject("WScript.Shell")
> strCommand = "WZUNZIP.EXE" & " -e -o- " &
> DTSGlobalVariables("gLocalImportFolder").Value & "\" & file & " " &
> strTempUnZipFolder
> oShell.Run strCommand
>
> The problem is that I am calling this process several times by iterating
> through a collection of zipped files and because the process is called
> asynchronously inside the iteration when the process is called whilst the
> unzipping process is not finished the control gose to the next commad
> which is moving the file to another folder and it is causing me a problem.
>
>
> Is there a workaround for this?
>
> Thanks
>



J-T

2005-07-26, 11:24 am

Thanks Darren:)
"Darren Green" <darren.green@reply-to-newsgroup-sqldts.com> wrote in message
news:eAdd$SbkFHA.1948@TK2MSFTNGP12.phx.gbl...
> Run Method
> (http://msdn.microsoft.com/library/d...ml/wsmthrun.asp)
>
>
> Look at the bWaitOnReturn parameter.
>
>
> --
> Darren Green
> http://www.sqldts.com
> http://www.sqlis.com
>
> "J-T" <J-T@nospam.com> wrote in message
> news:Ovb5TQWkFHA.3960@TK2MSFTNGP12.phx.gbl...
>
>



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