How do I set a default value?


Author
Message
Peter Jones
Peter Jones
Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi,

I'm obviously missing something pretty basic here but I can't see it. I have a table with a GUID as a PK. When I save a new record I get the error:

BusinessLayerException
 An error occurred while saving an the data to the server.
DataLayerSavingException
 Cannot insert the value NULL into column 'AGTID', table 'TMS201.dbo.tblAGTAttrGroupTypes'; column does not allow nulls. INSERT fails.
The statement has been terminated.
SqlException
 Cannot insert the value NULL into column 'AGTID', table 'TMS201.dbo.tblAGTAttrGroupTypes'; column does not allow nulls. INSERT fails.

However, in the BO I have the field set as per screen shot - note the screen shot also shows the property code for the column. I have tried setting the bo control value to "Return Alternate on Null" but the result is the same.

I also noticed that, when I create a new row, a checkbox for which I have a default value of 'True', is unticked on the new record. I was presuming that the defaults settings in the BO would take effect when a new is presented to the user for initial data entry - is this not so?

BTW my test form is using a DevEx grid.

Cheers, Peter

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search