AllowNullValuesOnNewRow problem


Author
Message
Sam Tenney
Sam Tenney
StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)
Group: StrataFrame Users
Posts: 70, Visits: 3.5K
Business objects have a property named AllowNullValuesOnNewRow which defaults to False.  The StrataFrame help system says "When True, the NewRow() function will automatically initialize the row to prevent any DBNull values from occurring." My first problem is that I think the help system explanation is probably wrong.  I think it should say "When False, the NewRow() function will automatically initialize the row to prevent any DBNull values from occurring." My second problem occurs when I use a non-nullable char data type as the primary key in my SQL table.  When I click the New button on a MaintenanceFormToolStrip to create a new record in that table, I get an error because the NewRow() function does NOT automatically initialize the primary key value to "" regardless of how I set the AllowNullValuesOnNewRow property.  The value of the primary key (which should be initialized to "" as a string) remains as DBNull which causes the error. There must be a reason why primary keys are ignored when initializing new row values, but I cannot imagine what that reason is.  Is this a bug or can somebody help me understand why the framework works this way. Sam Tenney
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search