Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Column 'COMPOSERID_' Does Not Allow Nulls

Created: 31 Jan 2013
Language Translations
rpoag's picture
0 0 Votes
Login to vote

I had been working with a workflow project for a while and all was going well. On my web form was a web data grid (gridview) component which worked fine one day and then broke the next. I kept getting this error and could not figure out why:

Exception Trigger Message: Column 'COMPOSERID_' does not allow nulls.

Exception Trigger Stack Trace: System.Data.NoNullAllowedException: Column 'COMPOSERID_' does not allow nulls. at System.Data.DataColumn.CheckNullable(DataRow row) at System.Data.DataColumn.CheckColumnConstraint(DataRow row, DataRowAction action) at System.Data.DataTable.RaiseRowChanging(DataRowChangeEventArgs args, DataRow eRow, DataRowAction eAction, Boolean fireEvent) at System.Data.DataTable.SetNewRecordWorker(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Int32 position, Boolean fireEvent, Exception& deferredException) at System.Data.DataTable.InsertRow(DataRow row, Int64 proposedID, Int32 pos, Boolean fireEvent) at System.Data.DataRowCollection.Add(DataRow row) at Logicbase.Components.FormBuilder.InfragisticsComponents.WebGrid.GridComponentRenderer.EnsureDataTable(IData data) at Logicbase.Components.FormBuilder.InfragisticsComponents.WebGrid.GridComponentRenderer.Load() at LogicBase.Components.FormBuilder.Core.FormComponentRenderer`1.LogicBase.Components.FormBuilder.Core.IFormComponentRenderer.Load() at LogicBase.Components.FormBuilder.FormBuilderComponentRenderer.Load() at LogicBase.Core.Models.Dialog.ComposerForm.OnLoad(EventArgs e)

The settings for my grid component looked like this:

To make a long story short this was actually NOT a workflow issue but a data issue. Somehow rows had been added to the database which had NULL for the Purchase Order Number column. Since the primary key was set to Purchase Order Number (see the image above) having the NULL value caused the error. Once I deleted those rows everything worked again as expected. This was a pain to track down so hopefully this will save someone some time.