LLBLGen Pro 2.0
Builder 2.0.0.0 Final, March 21st, 2007
Adapter for .NET 2.0
Runtime Library: 2.0.7.319
Database: SQL Server 2005
Hi,
I've used the product for quite awhile and love it, but for some reason this isn't clear to me in the documentation under "Using the entity classes", "Setting a field to NULL".
I'm using the following update pattern:
MyTableEntity entity = new MyTableEntity( primaryKey );
entity.IsNew = false;
entity.Field1 = "value";
entity.SetNewFieldValue( (int)MyTableFieldIndex.NullableField2, null );
adapter.Save( entity );
Field1 updates properly, but NullableField2 doesn't update because it's apparently not seen as changed.
I saw a reference to a Fields.IsChanged method, but I don't seem to have that available.
For now I'm just setting it to a value that represents a null, but I'd really like to set it to null. What am I doing wrong? It's a datetime field type if this makes a difference.
Thanks in advance!