Group: StrataFrame Users
Posts: 70,
Visits: 3.5K
|
Hi Ivan,
Unfortunately the post you referenced just confuses the issue even more. In that post, Trent explains that "You have the AllowNullValuesOnNewRow property set to False on a business object, it will automatically initialize the row for you." That statement agrees with what I believe is correct, but it disagrees with the StrataFrame help system which says referring to that property, "When True, the NewRow() function will automatically initialize the row to prevent any DBNull values from occurring." But then just to confuse me even more, Trent suggests setting the property to False which is what he said it was already set to. I am sure this was just a human mistake in typing, but I still don't know which statement is correct, Trent and me or the help system.
And no matter which statement is correct, I have tried both settings and still the primary key value is not being initialized and it remains set to DBNull which causes an error when the StrataFrame code merely tries to access the primary key value and cast it as a string and that happens long before attempting to Save to the database table.
For some unknown reason, the StrataFrame code is skipping past the initialization process for primary keys when adding new records. I expect there is a good reason for doing that but nobody has been able to explain it to me yet. And by the way, it looks to me like it would skip past initializing any primary key even if it was not a string type and the error would occur as long as the primary key was to be manually entered by the end user. And remember, the error occurs before the primary key value is even displayed in the textbox.
Just try it, I don't think you will like it.
Sam Tenney
|