Search codeauthority.com
  dallas custom software design

   Thursday, March 11, 2010                                                  (214) 774-4262    (800) 457-7163                                                           Login   
dallas custom software design development
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);"LoginId", null); oPayment.Save();

oPayment.SetNewFieldValue(

 

 

Permalink |  Trackback
  

 

Dallas, Texas Mxlogic Reseller