Exemple #1
0
 private String FormatObjectName(Urn ObjectURN)
 {
     if (threePartNames)
     {
         return(String.Format("[{0}].[{1}].[{2}]", ObjectURN.GetAttribute("Name", "Database"), (String.IsNullOrEmpty(ObjectURN.GetAttribute("Schema")) ? "dbo" : ObjectURN.GetAttribute("Schema")), ObjectURN.GetAttribute("Name")));
     }
     else
     {
         return(String.Format("[{0}].[{1}]", (String.IsNullOrEmpty(ObjectURN.GetAttribute("Schema")) ? "dbo" : ObjectURN.GetAttribute("Schema")), ObjectURN.GetAttribute("Name")));
     }
 }