Options

PAC 1 - NULL reference error packaging table with TEXT colum

Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
edited September 24, 2004 6:02AM in Knowledge Base
  • Date: 24 Sep 2004
  • Versions affected: 1.0
When packaging a database to produce a .net executable or a C# project, you may get the following error:
Object reference not set to an instance of an object
This is caused by tables which contain a column of datatype TEXT, NTEXT, or IMAGE that do not have a primary key column. The primary key column is used to index the BLOB column and the absence of the primary key causes Packager to try to index the BLOB on a NULL value.

At this time, there is no workaround except to add an identity column to the table (temporarily) and create a PRIMARY KEY constraint on it.
Sign In or Register to comment.