January 28, 2009 at 6:35 am
In Control flow creat variable FileName, Scope = package, Data type = string then :
Data Flow:
1) Drag Flat File Source end EDIT
2) In Flat File Connection Manager Editor set File Name e:\projects\import\txt\ss1.txt
3) Drag OLE DB Destination
4) In Connection Manager make connection to provider Native OLE DB\SQL Native Client
5) In server name localhost
6) Selected your database name
7) In OLE DB Destination Editor make this connection, data access mode and name of table
8)When you create connection manager for flat file go to properties, open expresion, go to property expression editor, make conectionString in property and in expression drop your variable.
ForEach loop Container:
1) Drag a Foreach Loop Container to control Flow.
2) On the collection page enumerator is Foreach File Enumerator
3) In the folder set your folder destination e:\projects\import\txt
4) In the files box type *txt
5) Traversesubfolder checkbox is cleared.
Then Drag Data flow to inside ForEach Loop Container.
January 28, 2009 at 7:03 am
Is this a tip or a question?
Russel Loski, MCSE Business Intelligence, Data Platform
January 28, 2009 at 7:11 am
This is a tip. I had to post it because all explanation on forum are not detailed and I couldn't make this yesterday alone. I spent time reading a forums and succeded. It could help to other users who trying to search this forum "how to import multiple files to database". I explained step by step.
January 28, 2009 at 7:20 am
Thank you!
😀
Russel Loski, MCSE Business Intelligence, Data Platform
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply