This project has moved and is read-only. For the latest updates, please go here.
1
Vote

Cannot access destination table ... and object or column name is missing or empty

description

I did the standard entities.BulkInsert(items.ToList()); and received the strange error in the title. I ran a SQL trace with profiler and found the offending line emitted from the program.

select @@trancount; SET FMTONLY ON select * from [].[MarketValue] SET FMTONLY OFF exec ..sp_tablecollations_100 N'.[MarketValue]'

The 'dbo' is missing from the first set of brackets in front of MarketValue.

[].[MarketValue]

should be

[dbo].[MarketValue]

Other BulkInsert queries in the same code base run fine and emit the correct SQL. I can't figure this one out.

comments