Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running DTS multiple times looping VB

Status
Not open for further replies.

runner15

MIS
Jul 7, 2004
5
US
I have a DTS package that imports Execl spreadsheet to a database table. I have coded it in VB where I have a loop that goes and gets the execl files and imports it to a database table. The problem is it only imports one file. I put a trace on the DTS through SQL Profiler. Profiler showed that from the second file (2nd loop) to the last file (end loop) the DTS(or user) logs into the network protocol: TCP/IP set quoted_identifier.. then runs the SQL:BatchCompleted for exec sp_oledb_ro_usrname and SQL:BatchCompleted for select collationname(0x0904D00034) then Logs out. The package should login into network protocol after the first two SQL:BatchCompleted. Then the SQL: BatchCompleted run twice for the Select query and insert bulk then log out. The only way to get it to run is shut down VB and start it up. This defeats the loop. How do I do I disconnect with out shutting down VB?

Thanks
D
 
Not sure I understand your question, you might try to elaborate on what your loops are doing, and how tehy are set up.

Here's a good example of how to do looping in DTS:
[small]----signature below----[/small]
You can't fit a square data in a round table
 
Thanks for the example on how to do looping in DTS, I will check it out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top