Advertisement

07.02.2008 at 07:56PM PDT, ID: 23535731
[x]
Attachment Details

DTS ActiveX VBScript Shell and Wait for unzip to complete before continuing

Asked by frankytee in MS SQL DTS, VB Script, ActiveX

Tags: sql 2000 dts activeX script

SQL Server 2000.
Hi
I have an active x vb script in a dts package which calls windows shell to unzip a WINRAR file. the problem is that the dts package returns "successful completion" while the files are stil being extracted.
A workaround would be to create a loop to delay the processing but as the files/filesizes can vary considerably and the timeframes available are very tight I need a foolproof method as another DTS package will execute afterwards that will import the files into the db.
below is my current code:
thanksStart Free Trial
1:
2:
3:
4:
5:
6:
7:
Function Main()
	Dim oShell
	Set oShell = CreateObject ("WScript.shell")
	oShell.run """C:\Program Files\WinRar\WinRar.exe"" X -o+  ""E:\DATA_SOURCE\LLAS\LLASDATA\ldtran.zip"" E:\DATA_SOURCE\LLAS\LLASDATA\Extracted\ARCHIVE\LDTRAN\"
	Set oShell = Nothing
	Main = DTSTaskExecResult_Success
End Function
 
Loading Advertisement...
 
[+][-]07.02.2008 at 08:03PM PDT, ID: 21922381

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MS SQL DTS, VB Script, ActiveX
Tags: sql 2000 dts activeX script
Sign Up Now!
Solution Provided By: sirbounty
Participating Experts: 3
Solution Grade: A
 
 
[+][-]07.02.2008 at 08:04PM PDT, ID: 21922385

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.02.2008 at 08:05PM PDT, ID: 21922389

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 08:07PM PDT, ID: 21922397

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 08:11PM PDT, ID: 21922411

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 08:16PM PDT, ID: 21922439

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.02.2008 at 09:06PM PDT, ID: 21922614

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628