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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populating text columns 1

Status
Not open for further replies.

Souvik

Technical User
Apr 2, 2003
11
IN
Hi,
I need to poplulate a column of the type text with the contents of a file. Would appreciate some help on how to do this with or without using DTS.

Thanks!!
 
I might be missing something, but what prevents you from executing a standard INSER/UPDATE on the column? Read the file into a variable and use this variable in your statement. For really long files (over 2MB) you might need to read chuncks of data use UPDATE to append it. For speed considerations beware of paging (i.e. long strings in memery are paged)

Some languages, like VB or C# offer more flexibility to manipulate long strings. Hope this helps.
 
Thanks for your reply, If I were to use a programming language to build such a functionality, then I would have to build an UI around it to choose the file to be loaded or atleast build a coomand line executable which accepts the file location & name as parameters. With DTS, I think I can avoid such extra coding which is why I was wondering if DTS can be leveraged to do such a job?? Ofcourse, my experience with Microsoft is not even a month!

Many thanks again!!
 
DTS Wizard imports formatted text - i.e. it needs at least row delimiter (like CRLF). You will get all lines of text imported into one column, many rows... While it is possible to write a procedure to concatenate all the rows into a single one, it is hardly an elegant solution. Use ActiveX scripting to import file from a DTS package.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top