dbTalk Databases Forums  

Thread problem for DTS in VB .Net

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


Discuss Thread problem for DTS in VB .Net in the microsoft.public.sqlserver.dts forum.



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

Default Thread problem for DTS in VB .Net - 10-07-2005 , 10:33 AM






Hi,
I develop a VB .NET application to call DTS COM to import text files into
SQL Server 2000 EE SP4. We need import more than 60 files by a loop. When I
tested in IDE sometimes it finished all files import successfully, sometime
it hang random at some file and at oConnection =
goPackage.Connections.New("DTSFlatFile") or oTask = CType(goPackage,
DTS.Package).Tasks.New("DTSDataPumpTask"). I already set
oStep.ExecuteInMainThread = True for all steps.
If I add a loop to run Application.DoEvents() after each file being
imported, this application will hang at Application.DoEvents() and the last
file can be successfully imported. It seems the thread in DTS for last file
didn't be released completely.
Thanks for any help!


Bill




Reply With Quote
  #2  
Old   
Bill Wang
 
Posts: n/a

Default RE: Thread problem for DTS in VB .Net - 10-07-2005 , 12:36 PM






Solved. It's a bug in IDE of VS.NET 2003.
My application won't hang when running it as EXE or running it by start
without debug in IDE (CTRL+F5). But it will be hang in IDE running by start
with debug(F5).

Bill

"Bill Wang" wrote:

Quote:
Hi,
I develop a VB .NET application to call DTS COM to import text files into
SQL Server 2000 EE SP4. We need import more than 60 files by a loop. When I
tested in IDE sometimes it finished all files import successfully, sometime
it hang random at some file and at oConnection =
goPackage.Connections.New("DTSFlatFile") or oTask = CType(goPackage,
DTS.Package).Tasks.New("DTSDataPumpTask"). I already set
oStep.ExecuteInMainThread = True for all steps.
If I add a loop to run Application.DoEvents() after each file being
imported, this application will hang at Application.DoEvents() and the last
file can be successfully imported. It seems the thread in DTS for last file
didn't be released completely.
Thanks for any help!


Bill




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.