This text is replaced by the Flash movie.

Search codeauthority.com
 dallas custom software design

   Sunday, September 07, 2008 Login   
dallas custom software design development
This text is replaced by the Flash movie.
dallas custom software development
 DEVELOPER'S BLOG SEARCH
  

 LLBLGenPro how to Update and set a NULL value.
Location: BlogsSONNY'S INFINTE WELL OF DEVELOPER HAPPINESS    
Posted by: Sonny Wilson Monday, October 22, 2007
To set a null value, instead of using Entity.Column = value, use Entity.SetNewFieldValue(ColumnName, null) method.

Build errors may occur if you to to set a null value like you would a non-null value.  i.e.

oPayment.LoginID = null;  

or

oPayment.LoginID = DBNull.Value; 

------------------------------------------------------------------------------------------------------------

Instead of trying to assign a value to the entity property as above, use the Entity.SetNewFieldValue() method to save a NULL value in the database. 

In this example, the LoginID is set to NULL:

 

PaymentEntity oPayment = new PaymentEntity(iPaymentID);

oPayment.SetNewFieldValue("LoginId", null);

oPayment.Save();

Permalink |  Trackback
  

Dallas, Texas Mxlogic Reseller