Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Import batch csv files using DTS and VB6

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-09-20 : 08:36:18
Joan writes "Dear all,

I want to create a VB application to let user choose multiple csv files they want to import into the SQL Server Database (to same table).

I already create a DTS package that read the Source csv file and using the Trasform Data Task to transform the data into the destination table. I hav no problem in calling this package from my vb application and also get the files selected by user.

My problem is:

1) how to dynamically assign the csv files according to what user choose into my DTS? using global variable?"

mwjdavidson
Aged Yak Warrior

735 Posts

Posted - 2004-09-20 : 11:58:57
Yes, use a global variable within the package to set the DataSource property of your text connection via either a Dynamic Properties task or an ActiveX Script task. N.B. obviously, this will only work if all your text files are in the same format!

Mark
Go to Top of Page

samsekar
Constraint Violating Yak Guru

437 Posts

Posted - 2004-09-20 : 11:59:37
Yep! USE Global Variable and ActiveXScript. You can find good examples in www.sqldts.com

- Sekar
Go to Top of Page
   

- Advertisement -