You could define an extension method like this (I'm not a VB programmer so please excuse the syntax errors): <Extension()> Public Sub OrDBNull(ByVal val As Decimal) If val = 0 return DBNull.Value End If return val ; End Sub So your command parameters would become: sqlCommand.Parameters.Add(New SqlParameter("GroupID", SqlDbType.Decimal)).Value = groupObj.OrDBBull() sqlCommand.Parameters.Add(New SqlParameter("SiteID", SqlDbType.Decimal)).Value = siteObj.OrDBNull()