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

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


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.


should be


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