{get{Guid id = this.CurrentRow["ApproverId"] == DBNull.Value ? Guid.Empty : (Guid)this.CurrentRow["ApproverId"];if (id != null){ //-- Obviously you will want to call another internal method. But you should get the idea. Calling //-- a scalar method would be faster and cleaner than your other code. return (string)Me.ExecuteScalar("SELECT code FROM WhateverTable WHERE mycriteria = @mycritera);
}else{ return string.Empty;}}}
If you can't get it to work, then post a sample that reproduces the problem instead of posting code snippetts. Thanks.