Cannot fetch a row from OLE DB provider “BULK” for linked server “(null)”

August 13, 2009

[Bulk Insert Task] Error: An error occurred with the following error message: “Cannot fetch a row from OLE DB provider “BULK” for linked server “(null)”.The OLE DB provider “BULK” for linked server “(null)” reported an error. The provider did not give any information about the error.Bulk load: An unexpected end of file was encountered in the data file.”.

This was, from…

Wrong setting of ColumnDelimiter= tab when actually it was ColumnDelimiter= comma.

Splendid. Excellent error message.

It’s much easier this way:

1. Create a Data flow task.

2. Use Excel source. Map the names so it matches the destination column name.

- Keep null.

- Adjust maximum length and column type. (Excel driver is lazy.) String is 255 long and columns beginning with number becomes int. For example, (1,2,…,8a, 8b,… ) is assumed as an “int” field.

3. Use oledb destination.

4. Run. It will be in nvarchar and ntext, all over.

5. Run sql scripts – Just do alter table alter column. It’s simpler and easier.

:nvarchar to varchar:    Alter table xxx alter column yyy varchar(500)

:ntext to varchar:           Alter table xxx alter column yyy varchar(1500)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: