Re: Cannot fetch a row from OLE DB provider "BULK" for linked server

I've been trying for a couple of days to resolve an error (7330 - Cannot
fetch a row from OLE DB provider "BULK" for linked server "(null)".)
that I consistently receive during a stored proc Bulk Insert from a text
file. From the SQL Server 2005 .TXT file exported from Access 2007 using
TransferText Format file created using BCP
...

Database table in SQLServer has the same structure - but data types vary
from format file. Early attempts did not include a format file at all. I
found a disscussion group post that indicated a format file as defined
above would be useful. From that post, the author says "no matter the
datatypes in the destination table, the source is just a plain ascii
file, so specify all columns in the format file as SQLCHAR, all prefixes
as zero, and the length as the actual charachter length, not the
bytelength for the datatype. (ie a datetime becomes 26 instead of 8
etc)"

The format file does not look entirely correct, although I'm not sure
that is why you get the error.

First of all, I would change change the numbers in the fourth column to 0.
Not that I know whether it matters. My impression is that if you specify
both a delimiter and a length, that only the delimiter matters. But I could
be wrong.

In any case, your delimiters are probably not correct. I notice that
some fields in the data file are quote-delimited. BULK INSERT will
insert those quotes as they are data, unless you explicitly specify
them as delimiters in the file. So if a field is quote-delimited, the
field before should have ",\"" as the delimiter, and the field itself
should have "\"," - or "\",\"" if the next field is also quote-delimited.

There are also some things in your BULK INSERT statement that you can
take out: