The import works fine when the path to the file is hard-coded. It does NOT however work (with the above error), when I set the Flat File Connection Manager Connection String Property in a VB Script Task.
I am using this to set the Connection String and it does get set correctly. A Variable (strFileLocationFileName contains the File Path and File Name).
ConnectionManager.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFileLocationFileName & ";Extended Properties=""text;HDR=YES;FMT=Delimited"";"
The issue was resolved when I removed this Script Task and instead assigned the File Name and File Location to the Flat File Connection Manager Connection String as an Expression using the strFileLocationFileName Variable.

No comments:
Post a Comment