![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I am trying to import a comma delimited text file with double quotes as the text qualifier. The DTS is scheduled daily. I don't control the source file contents. The latest file included a field with another set of double quotes in the field. When the dts runs I get an error, Invalid Delimited data: text qualifier must be followed by a column delimiter I have tried to use the replace function in an activex script but I can't get it to work. Here is the text causing the problem: "18717","BRENZAN","ROGER "CRAIG"","HDO" Here is the Activex Script I am trying to use to replace it: Function Main() dim s1 Const ForReading = 1 Const ForWriting = 2 s1 = ("ROGER "CRAIG"") Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile("c:\importdata\unitrax\reptabl e.txt", ForReading) strText = objFile.ReadAll objFile.Close strNewText = Replace(strText, s1,"CRAIG") Set objFile = objFSO.OpenTextFile("c:\importdata\unitrax\reptabl e.txt", ForWriting) objFile.WriteLine strNewText objFile.Close this script should find the problem and replace it but I can't get it to work, it says it expected ')' in the search string. Any suggestion would be appreciated. Graham |
![]() |
| Thread Tools | |
| Display Modes | |
| |