.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Flat File Loading Problem -> Messed Up Delimiters and Error Logging Issue

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :Sql Server
Hey Everyone,

I have a Data-Flow task embedded in a Sequence Container (does not fail component on error) on the Control Flow panel of the SSIS designer.  This data flow task contains a connection to a Flat File Source -> A Data Transformation -> Into an OLE Db Destination.

The problem is that the Flat File isn't always delimited properly -> the client cannot be relied on to do this.

My question is when the delimiters are messed up, how can I capture the offending error row(s) from the Flat File Source?

What I've tried:
1) Set every column in the source flat file on error to: Redirect Row
2) Added a Script Transformation to pull the description and the record id out of the offending row
3) Added an Error file flat file destination to the end of the flow.

The package always fails on the Flat File Source and never Redirects the offending Row to the error output - I never see my onError Script Transformation go Green, Red, or Yellow - SSIS doesn't let it get there.

I'm really new to SSIS so sorry if this is a super basic question.

Here is the Error Text:

[Source - InventTable_csv [1]] Error: The column delimiter for column "RECID" was not found.
[Source - InventTable_csv [1]] Error: An error occurred while processing file "C:\------InventTable.csv" on data row 15228.

View Complete Post

More Related Resource Links

Issue: Load {NUL} from flat file to "Flat File Source" faild.

Hi guys, I've met a strange issue when I was working to use SSIS to load data from flat file to database. It is a story about {NUL}. Sample Flat File: FIELD_SAMPLE|OTHERS ABC{NUL}DEFG|Any Others   I placed an Flat File Source to load these into package, and the configuration of the Connection Manager are as following: FIELD_SAMPLE: Unicode string [DT_WSTR], Length 8   Then I click the "Preview" button and I can see this data in the "Preview" window correctly (with the value "ABC{NUL}DEFG"). But when I tried to run this package, I've got an error that the "ABC{NUL}DEFG" is too long for this field. Then I changed the length to 20 and it was loaded into SSIS package. But I found the value in SSIS package is "ABC", and "{NUL}DEFG" was not there~ I have no ideal why it is ok in Preview but it is not ok when the package running~     Anyway, I hope to load the {NUL} from the flat file into target database. So that is there anybody could give me a hand?

Error Loading dll file

RUNDLL:  Error loading C:\WINDOWS\etowufilelufiwu.dll.  The specific module could not be found.

How do you specify special characters as flat file delimiters?

I have a flat file that has fields delimited by tilde {~} and rows delimited by {CR}{LF}.  The problem is, my source is spitting out the {NULL} (&H00) at the end of the row. The data displays correctly in the pre-viewer (with a non-print symbol at the end of the last field), but gives an error when I try to run the package. Example: "data"~"data"~"data"{NULL}{CR}{LF} I can process the row in c# using: "\0\r\n" as the row delimiter.   What is the equivalent notation for SSIS?   Thanks,

Flat file upload: Error when inserting into datetime field.

Hi All I am having an issue with uploading a txt file into an SQL table and one of the fields needs to go into a datetime column. The issue is with column3 I have been into the advanced editor of the flat file source and set the output column to decimal and it fails. The error I am getting is below: Error: 0xC02020A1 at Materials Transfer, Flat File Source [1]: Data conversion failed. The data conversion for column "Column 3" returned status value 2 and status text "The value could not be converted because of a potential loss of data.". Error: 0xC0209029 at Materials Transfer, Flat File Source [1]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "output column "Column 3" (48)" failed because error code 0xC0209084 occurred, and the error row disposition on "output column "Column 3" (48)" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure. Error: 0xC0202092 at Materials Transfer, Flat File Source [1]: An error occurred while processing file "D:\Development\r3_downloads\mat.txt" on data row 1. Any help would be great.   Thanks BigGopher

There has been an error while loading the form - The following file is not a valid InfoPath form tem



We’re experiencing quite an odd issue with opening forms within a SharePoint form library. These are the symptoms;

We recently published a newer version of an InfoPath form, and have since received some feedback that the form no longer opens in the “View Properties” view of SharePoint.

Rather interesting though, within the standard view all form instances can be opened with no problem.

The reason this has to work within the “View Properties” view of SharePoint is because we have a workflow that is sent, with a link to this particular page.

This is the error message that is displayed;


There has been an error while

Error loading from XML. No further detailed error information can be specified for this problem beca


I am using SMO within c#.NET to build a SMO transfer object and then execute it to transfer data between various SQL instances...Think Import/Export wizard with some error handling ;)

using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Common;

If i run in debug mode the application runs fine.  As soon as I publish and run it on the same machine, same user I get the following error as soon as the transfer is attempted

The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.". This occurs when CPackage::LoadFromXML fails.

Having watched the package it's ouput in DEBUG mode I can see it creating temporary xml files (TransferMetadata491574513.xml) with the various SQL scripts and a temporary DTSX file in "C:\Documents and Settings\MYUSER\Local Settings\Application Data\Microsoft\SQL Server\Smo" , these do not get created using the published version.

If i run the exe in the DEBUG or RELEASE folder it also works fine.  The only issue is when i Publish the application.


Any suggestions?


I have checked the two MSDN articles http://support.microsoft.com/?id=918038 and http:

Flat file to sql server problem


i m importing one flat file to sql server ...in that flat file one column is showing as string ..whn i m importing to sql server i m taking it as nvarchar...Data is ok ..

But whn i do some actions like sum ..if there is null in sql server it is show as  value+null as valuenull...(it is taking null as string not as null into sql server)

sample data

col1               Col2

234445         null


output like (when do sum)



How to proceed for this.


SSIS: Error in the package when the data in the flat file source is modified


Hi All,

I have a package which loads data from a flat file source to an OLEDB destination, which is executed successfully and data is loaded perfectly.

But later when the data in the flat file source is modified i.e. if an extra column gets added to the text file, the package is throwing an error because it is unable to detect the extra added column.

How can i avoid this error??? I need my package to execute successfully ignoring the changes(added columns) happened in the flat file source.

Please provide me wth your suggestions and solutions....

Thanks in Advance!!

StreamReader issue with flat file



Please observe this flat file image: http://screencast.com/t/YMpeI5pOlI

You will on the bottom of the text file, line numbers shown by MSVS 2005 that tell me that a line exists, yet with no TEXT along side it, the text file has too many carriage returns at the bottom. Lets call these BLANK ROWS of data in my text file.

The issue is when I import this data like (vbNET):

Dim oRead As StreamReader
Dim str As String
Dim rows(0) As String

oRead = New StreamReader(FullPath)
str = oRead.ReadToEnd()
str = str.Replace(vbCr, "")
rows = str.Split(ControlChars.Lf)

The rows array has entries within it for the BLANK lines I show in the image attached. And this mucks up my indexes when I manipulate that rows data.

Can I do a 'Replace' or something to clear these BLANK lines before they get into my rows array ??

At the moment I just clean up the text file before import, but I need a coding solution to make my life easier !

Any ideas ! What do you do ?

Error Running SSIS Package as SQL Agent Job loading a file from network drive, works fine in bids an

Having problems reading an excel file from a networked drive while running a package as a SQL Agent job step as a type "SQL Server Integration Services Package". I have agent running as an AD account, and I can use the execute package utility logged in as this account and it works. When I log into the server as this account, I can see the network drive, read/write/create to folders on the drive but when I try to run the agent job it cant find the file. I tried using the unc path in the config file rather than a mapped drive, still no luck. If I use a local drive (c) in the config file, the job works fine so it has to do with the network drive. Running windows server 2003 standard R2, SQL Server 2005 standard sp3. Any ideas out there?

Problem Loading Data from Excel file


hi all

i am loading Data From one my Excel file to DataTable. My Excel file has data in Following Format:

Vendor ID Invoice Number Invoice Date  Entity Invoice Amount
Remarks GL Account
5586   e5500222117 5/14/10  Entiti1                       3.000
some 210000
5586   5500231216 6/11/10  Entiti1                       4.000
hello 210000

.OCX reference issue "Path/File Access Error"


Hi All,

hopefully someone has solution of this error.

i am adding reference on a .ocx file in my project.

When i tried to access the method of this file .

I get the following message "Path/File Access Error"

I tried running the following commands 'regsvr32 XYZ.ocx'.

but issue is same.

Thanks in advance

Logging logevents to flat file using Microsoft Enterprise Library



I Want to log logevents to text file using Microsoft enterprise library, but i could not find any decant tutorial for same.

If you guys have any tutorial or link, please pass it to me.






Problem in Date Format While Exporting To Excel Destination From Flat File Source In SSIS



I have a flat file(.csv) which contains data(strings incuding date in yyyy-mm-dd format).This i am using in Flat File Source and want to export those data to an Excel Destination.Before exporting to Excel Destination i have created a Derived Column component where i am using an express to get day,month,year part and creating a date sting in dd/mm/yyyy format then conveting it to DT_DATE datatype and then exporting to Excel Component.But while exporting to Excel this date format is getting changed to mm/dd/yyyy format.

The expression i used in derived column is

(DT_DATE)(SUBSTRING(date,9,2) + "/" + SUBSTRING(date,6,2) + "/" + SUBSTRING(date,1,4))

where date is a column from Flat File Source.

Even I changed the Locale to English(United Kingdom) in Flat File Connection Manager for the above .csv file.But still it didnt work.

I searched a lot in google and failed to get any solution on this.

Can anyone help me in solving this issue ?

IsapiModule Error 500 Issue


I am about exhausted trying to figure out this error:

HTTP Error 500.0 - Internal Server Error

Description: The page cannot be displayed because an internal server error has occurred.

Error Code: 0x8007007b

Notification: ExecuteRequestHandler

Module: IsapiModule

Requested URL: http://localhost:80/ReportServer

Physical Path: c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

When I enable Failed Request Tracing Rules and view the log output I am supposing that the actual problem is in the 2nd call where there are 2 backslashes before the actual filename in the specified path:


CALL_ISAPI_EXTENSION DllName="C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_isapi.dll"


User validation Issue in xlsx file



I am validating user from Login.xlsx file. It was working fine by validating email and password from that file. For testing i got new file same contents of file but added some more user names.

So after that when i validating the user i am getting the following error "Data type mismatch in criteria expression".

But when i replaced the new to old one it is working fine. The contens of both files are the same. So why this kind of error happened.


While Importing Excel 2007 file to Datatable - headerrow problem


Hi there,


I am trying to simply extract an excel data from an uploaded file an put it into a datatable. In this case the excel file has 3 rows but when I fill the datatable I only see row count of 2.

I tried changing HDR:NO; to HDR:YES and vice versa, but no luck. 

What am I doing wrong? (Note: the excel file cannot have a  headerrow)


string connstr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + pFilePath + ";Extended Properties=\"Excel 12.0;IMEX=1;HDR:NO;\"";
            OleDbConnection conn = new OleDbConnection(connstr);
            DataTable dtTables = conn.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Tables, null);
            string strTablename = dtTables.Rows[0]["TABLE_NAME"].ToString();
            string strSQL = "SELECT * FROM [" + strTablename + "]";

            OleDbCommand cmd = new OleDbCommand(strSQL, conn);

            DataTable dt = new DataTable();
            OleDbDataAdapter da = new OleDbDataAdapter(cmd);
            //At this point row count=2 which doesn't make sense




ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend