dbTalk Databases Forums  

text file import and encoding

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


Discuss text file import and encoding in the microsoft.public.sqlserver.dts forum.



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

Default text file import and encoding - 06-07-2004 , 08:36 AM






I need to import a fixed-width text file, but I encounter a problem with SQL Server DTS.
The text file definition is based on characters numbers, whereas the fields are defined on a number of bytes.
Unfortunately, some fields possess a mix of double-bytes and single-bytes characters which means I cannot create a proper import rules.
I thought of first converting the text file with an ActiveX task, but VBScript lack of many features (I can manage it easily with Access and the VBA strConv(s, vbFrom Unicode) function, but it doesn't exist in VBScript). The problem is internally, all characters seems to be converted to Unicode, so a Lenb on each characters returns 2.
As I lack of options within DTS, I thought about compiling a little exe, and call it from DTS, but to do this would be less simple to maintain for the future, so I am wondering if anyone has a better idea.

Thanks in advance for any good ides

Regards

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.