[{"data":1,"prerenderedAt":532},["ShallowReactive",2],{"article-cannot-resolve-collation-conflict":3},{"article":4,"tags":52,"previous":67,"next":389},{"id":5,"title":6,"author":7,"body":8,"createdAt":41,"description":42,"extension":43,"img":42,"meta":44,"navigation":45,"path":46,"seo":47,"stem":48,"tags":49,"updatedAt":41,"__hash__":51},"articles\u002Farticles\u002Fcannot-resolve-collation-conflict.md","Cannot Resolve Collation Conflict","[object Object]",{"type":9,"value":10,"toc":37},"minimark",[11,15,18,21,24,31,34],[12,13,14],"p",{},"“Cannot resolve collation conflict for equal to operation” – huh?",[12,16,17],{},"When joining fields in different collated databases you can see the above error message. ",[12,19,20],{},"In my particular case I had two databases with different collations and I was doing a join across the databases on the fields.",[12,22,23],{},"The resolution was to add the keywords",[12,25,26,27,30],{},"“COLLATE DATABASE_DEFAULT” near the equal ‘=’ signs.  For example:                          SELECT p1.BEEF_1 FROM dbo.PHEN p1 INNER JOIN \nDatabase2.dbo.PHEN p2 ON p1.BEEF_1 COLLATE DATABASE_DEFAULT =p2.BEEF_1 COLLATE DATABASE_DEFAULT AND",[28,29],"br",{},"\np1.BEEF_2 COLLATE DATABASE_DEFAULT=p2.BEEF_2 COLLATE DATABASE_DEFAULT            Collation can affect where clauses, join predicates, functions and databases.",[12,32,33],{},"More about Collation  A Collation encodes the rules governing the proper use of characters for either a language,\nsuch as Greek or Polish or an alphabet such as Latin1_General (the Latin alphabet used by western European languages).",[12,35,36],{},"Each SQL Server collation specifies three properties: sort order for Unicode data types (nchar, nvarchar, ntext), the sort order for non-Unicode character types\n(char, varchar and text) and finally the code page used to store non-Unicode character data.  A SQL Server collation defines how the database engine stores and\noperates on character and Unicode data.",{"title":38,"searchDepth":39,"depth":39,"links":40},"",2,[],"2015-04-20T08:07:16.9200000-04:00",null,"md",{},true,"\u002Farticles\u002Fcannot-resolve-collation-conflict",{"title":6,"description":42},"articles\u002Fcannot-resolve-collation-conflict",[50],"sqlserver","18hrmGHKYf7WtDSCubhBbJSReXrd9i7CyaWJs-LwY0Q",[53],{"id":54,"title":55,"body":56,"description":60,"extension":43,"img":61,"meta":62,"name":50,"navigation":45,"path":63,"seo":64,"stem":65,"__hash__":66},"tags\u002Ftags\u002Fsqlserver.md","Sqlserver",{"type":9,"value":57,"toc":58},[],{"title":38,"searchDepth":39,"depth":39,"links":59},[],"SQL Server is a relational database management system, or RDBMS, developed and marketed by Microsoft.","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1598313183973-4effcded8d5e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=675&q=80",{},"\u002Ftags\u002Fsqlserver",{"description":60},"tags\u002Fsqlserver","pSzcNnE-XyUgq8RlgK2xBpbJV7_7o5NLS2XlwBxFyAg",{"id":68,"title":69,"author":7,"body":70,"createdAt":41,"description":380,"extension":43,"img":381,"meta":382,"navigation":45,"path":383,"seo":384,"stem":385,"tags":386,"updatedAt":41,"__hash__":388},"articles\u002Farticles\u002Fasp-net-ajax-client-library-global-shortcut-list.md","ASP.NET AJAX Client Library Global Shortcut List",{"type":9,"value":71,"toc":378},[72,81,84,87,99,111,120,159,168,210,219],[12,73,74],{},[75,76,80],"span",{"className":77,"style":79},[78],"Apple-style-span","word-spacing: 0px; font: 13px arial; text-transform: none; color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; text-align: left; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0","Recently, Microsoft released their ASP.NET AJAX Framework which allows developers to build AJAX applications more easily.  ASP.NET AJAX consists of two pieces. ",[12,82,83],{},"1.) Microsoft AJAX Library - contains a set of script files that provide common functions and an OO programming framework",[12,85,86],{},"2.) ASP.NET 2.0 AJAX Extensions - includes a set of server controls that allows developers to add AJAX functionality by dragging and dropping controls onto a page",[12,88,89,90,98],{},"The following are brief descriptions of the javascript extensions made available by the AJAX Client Library by Namespace.  ",[75,91,93,97],{"className":92,"style":79},[78],[94,95,96],"strong",{},"Global Namespace"," - contains members and types that extend base JavaScript objects.","  ",[100,101,102,103,110],"blockquote",{},"   ",[75,104,106,109],{"className":105,"style":79},[78],[94,107,108],{},"Array Extensions"," (add, addRange, clear, clone, contains, dequeue, enqueue, forEach, indexOf, insert, pars, remove, removeAt)"," ",[100,112,102,113,110],{},[75,114,116,119],{"className":115,"style":79},[78],[94,117,118],{},"Boolean ","Extension (parse - converts a string into a Boolean)",[100,121,102,122],{},[75,123,125,128,129,131,132,134,135],{"className":124,"style":79},[78],[94,126,127],{},"Date ","Extension (format, localeFormat, parseInvariant, parseLocale)",[28,130],{},"\nvar today = new Date();",[28,133],{},"\nalert (today.format('D'));",[12,136,137,138,140,141,143,144,146,147,149,150,152,153,155,156,158],{},"d - Short date pattern (05\u002F10\u002F07)",[28,139],{},"\nD - Long date pattern (Thursday, 10 May 2007)",[28,142],{},"\nt - Short time pattern (18:05)",[28,145],{},"\nT - Long time pattern (18:05:12)",[28,148],{},"\nF- Full date pattern (Thursday, 10 May 2007 18:05:12)",[28,151],{},"\nM - Month and date pattern (May 10)",[28,154],{},"\ns - Sortable date and time pattern (2007-05-10T18:05:12)",[28,157],{},"\nY - Year and month pattern (2007 May) ",[100,160,102,161,110],{},[75,162,164,167],{"className":163,"style":79},[78],[94,165,166],{},"Error Extensions"," (argument, argumentNull, argumentOutOfRange, argumentType, argumentUndefined, create, invalidOperation, notImplemented, parameterCount, popStackFrame)",[100,169,102,170,177,178],{},[75,171,173,176],{"className":172,"style":79},[78],[94,174,175],{},"Number Extension"," (format, localeFormat, parseInvariant, parseLocale)","    ",[75,179,181,182,184,185,187,188,190,191],{"className":180,"style":79},[78],"        p - number is converted to a string that represents a percent",[28,183],{},"\nd - converted to a string of decimal digits",[28,186],{},"\nc - converted to a string that represents a currency",[28,189],{},"\nn - converted to a string of the form \"-d,ddd,dd\"",[12,192,193,194,196,197,110],{},"var num = Number.parseInvariant(\"130.33\");",[28,195],{},"\nalert (num.localeFormat(\"c\")); \u002F\u002F $130.33    ",[75,198,200,203,204,206,207,209],{"className":199,"style":79},[78],[94,201,202],{},"Object Extensions"," (getType, getTypeName)",[28,205],{},"\ngetType - returns the type of specified object",[28,208],{},"\ngetTypeName - returns the type name of an object",[100,211,102,212,110],{},[75,213,215,218],{"className":214,"style":79},[78],[94,216,217],{},"String Extension"," (endsWith, format, localeFormat, startsWith, trim, trimEnd, trimStart)",[75,220,222,230,264,282,283],{"className":221,"style":79},[78],[94,223,224,110],{},[225,226,229],"a",{"href":227,"target":228},"http:\u002F\u002Fmsdn.microsoft.com\u002Fen-us\u002Flibrary\u002Fbb397536.aspx","_blank","Sys Namespace",[12,231,232,233,235,236,238,239,241,242,244,245,247,248,250,251,253,254,256,257,259,260],{},"Sys - root namespace containing some base classes such as Sys.CultureInfo",[28,234],{},"\nApplication - objects\u002Fmethods that expose client events and manage client components",[28,237],{},"\nApplicationLoadEventArgs - container object for arguments of the Application Load event",[28,240],{},"\nCancelEventArgs - base class for events that can be canceled",[28,243],{},"\nComponent - base class for all asp.net ajax objects including Control class and Behavior class",[28,246],{},"\nCultureInfo - object that can be used to provide locale specific functionality",[28,249],{},"\nDebug code - debugging and tracing functionality",[28,252],{},"\nEventArgs - used for storing event arguments",[28,255],{},"\nEventHandlerList - collection of client events for a component containing event names and handlers\nPropertyChangedEventArgs - contains event arguments associated with changed properties",[28,258],{},"\nStringBuilder - facilitates more efficient ",[225,261,263],{"href":262,"target":228},"http:\u002F\u002Fmsdn.microsoft.com\u002Fen-us\u002Flibrary\u002Fbb310852.aspx","string concatenation",[12,265,266,267,269,270,272,273,275,276,278,279,281],{},"Sys.Net - provides networking and communication support",[28,268],{},"\nSys.UI - contains set of classes for UI support",[28,271],{},"\nSys.Services - support for asp.net application services such as login\u002Fauthentication",[28,274],{},"\nSys.Serialization - provides support for data serialization\u002FJson",[28,277],{},"\nSys.WebForms - contains classes for async page loading",[28,280],{},"\n  ","                                                                                                                                                                                                                                                                      ",[284,285,289],"table",{"cellSpacing":286,"cellPadding":286,"width":287,"border":288},"0",748,0,[290,291,292,309,317,325,333,341,349,357,365,372],"tbody",{},[293,294,295,303],"tr",{},[296,297,300],"td",{"vAlign":298,"width":299},"top",145,[94,301,302],{},"Shortcut",[296,304,306],{"vAlign":298,"width":305},601,[94,307,308],{},"Description",[293,310,311,314],{},[296,312,313],{"vAlign":298,"width":299},"$addHandler",[296,315,316],{"vAlign":298,"width":305},"Shortcut to Sys.UI.DomEvent.addHandler method",[293,318,319,322],{},[296,320,321],{"vAlign":298,"width":299},"$addHandlers",[296,323,324],{"vAlign":298,"width":305},"Shortcut to Sys.UI.DomEvent.addHandlers method ",[293,326,327,330],{},[296,328,329],{"vAlign":298,"width":299},"$clearHandlers",[296,331,332],{"vAlign":298,"width":305},"Shortcut to Sys.UI.DomEvent.clearHandlers method",[293,334,335,338],{},[296,336,337],{"vAlign":298,"width":299},"$create",[296,339,340],{"vAlign":298,"width":305},"Shortcut to Sys.Component.create method",[293,342,343,346],{},[296,344,345],{"vAlign":298,"width":299},"$find",[296,347,348],{"vAlign":298,"width":305},"Shortcut to Sys.Application.findComponent method",[293,350,351,354],{},[296,352,353],{"vAlign":298,"width":299},"$get",[296,355,356],{"vAlign":298,"width":305},"Shortcut to Sys.UI.DomElement.getElementId method",[293,358,359,362],{},[296,360,361],{"vAlign":298,"width":299},"$removeHandler",[296,363,364],{"vAlign":298,"width":305},"Shortcut to System.UI.DomEvent.removeHandler method",[293,366,367,370],{},[296,368,369],{"vAlign":298,"width":299}," ",[296,371,369],{"vAlign":298,"width":305},[293,373,374,376],{},[296,375,369],{"vAlign":298,"width":299},[296,377,369],{"vAlign":298,"width":305},{"title":38,"searchDepth":39,"depth":39,"links":379},[],"The following are brief descriptions of the javascript extensions made available by the AJAX Client Library by Namespace","\u002Farticles\u002Fimages\u002FfB5BBkL2by.png",{},"\u002Farticles\u002Fasp-net-ajax-client-library-global-shortcut-list",{"title":69,"description":380},"articles\u002Fasp-net-ajax-client-library-global-shortcut-list",[387],"javascript","WhenAc5IArfx2XOO9yOgZabko6SX3dvPL2yA13Q5O50",{"id":390,"title":391,"author":7,"body":392,"createdAt":41,"description":42,"extension":43,"img":522,"meta":525,"navigation":45,"path":526,"seo":527,"stem":528,"tags":529,"updatedAt":41,"__hash__":531},"articles\u002Farticles\u002Fdesign-guidelines-classes-vs-interfaces.md","Design Guidelines–Classes vs. Interfaces",{"type":9,"value":393,"toc":523},[394,412,437,449,462,474,480,486,491,497,510,513,518],[12,395,396,397,399,401,403,404,407,408,411],{},"This is 2nd in a series of articles on .NET design practices.  This article concentrates on classes and interfaces and how they differ and how\u002Fwhen to implement.",[28,398],{},[94,400],{},[28,402],{},"\nAn ",[94,405,406],{},"interface"," defines the signatures for a set of members that implementers must provide.  Interfaces ",[94,409,410],{},"cannot"," provide implementation details for the members.  Interfaces provide definitions for events, indexers, methods and\u002For properties.  Interfaces are inherited by classes and structures which must provide an implementation for each interfaces’ members.  The Interface doesn't actually do anything but only has a signature for interaction with other classes or interfaces.",[12,413,414,415,418,419,421,422,421,424,426,427,421,429,421,431,433,436],{},"By convention interfaces are prefixed with a capital “I”.  Interfaces differ from abstract classes in that they only define the member definitions (never the implementations).  Interfaces are good ",[94,416,417],{},"for designing components that are interchangeable ","as they all expose specific public members in a consistent manner.  This is key to understanding the value of interfaces.  The ability to have a series of components with similar properties and methods (aka. contracts) promotes consistency and information to the developer.",[28,420],{},"\n ",[28,423],{},[28,425],{},"\nInterfaces may also be inherited by other interfaces and any class or structure that implements an interface much implement all members in an entire interface inheritance chain.  Interfaces in C# are provided as a replacement of multiple inheritance. Because C# does not support multiple inheritance, it was necessary to incorporate some other method so that the class can inherit the behavior of more than one class.",[28,428],{},[28,430],{},[28,432],{},[94,434,435],{},"Danger, Danger: ","If the interfaces are poorly designed and have to change (add functionality) after they have been deployed it WILL cause cascading breaks in existing classes that have implemented them.  As such, interfaces need to be carefully designed.  Alternatives to the interface approach is utilizing abstract classes.   Similarly, modifications to abstract classes can have have breaking issues of derived classes if care is not taken.  Interfaces vs. Abstract classes will be covered in a future article but note that both have things we need to watch for when making modifications. ",[12,438,439,440,442,443,445,446,448],{},"Interfaces however are contracts that the developer is keenly aware of and as such he\u002Fshe knows that they cannot change and so just the existence of the interface ensures that everyone is aware of how consistent they must be maintained.  In this essence the usage of an interface establishes a consistent contract (methods and properties) that will not be changed.",[28,441],{},"\nRemember, an interface tells a class that another class implements all the methods contained in an interface, therefore, you do not have to know what type of object it is, only that it implements the interface.  With interfaces we are moving away from considering classes in terms of what they are, and starting to think about them in terms of what they can do.",[28,444],{},"\nSo, interfaces are good for establishing similarities between unrelated classes without locking in relationships between classes.  As such they declare methods that one or more classes (of different types) are expected to implement.  Interfaces are similar to base classes in that they provide structure to other derived classes and both can be used for polymorphism.",[28,447],{},"\nInterfaces are different than base classes in that:",[450,451,452,456,459],"ul",{},[453,454,455],"li",{},"A class can inherit only one base class, but it can implement many interfaces",[453,457,458],{},"A base class can contain implementation, an interface cannot",[453,460,461],{},"Interfaces can only contain Methods, Properties, Indexers, and Events. They cannot contain fields or constants (which are used for implementation)",[12,463,369,464,421,466,468,110,471],{},[28,465],{},[28,467],{},[94,469,470],{},"Classes vs. Interfaces",[94,472,473],{},"Guidelines",[12,475,476,479],{},[94,477,478],{},"Classes ","define both member signatures and implementation details for each member. Abstract (MustInherit in Visual Basic) classes can behave like interfaces or regular classes in that they can define members, and they can provide implementation details but are not required to do so. If an abstract class does not provide implementation details, concrete classes that inherit from the abstract class are required to provide the implementation.",[12,481,482,483,485],{},"While both abstract classes and interfaces support separating contract from implementation, interfaces cannot specify new members in later versions while abstract classes can add members as needed to support additional functionality.",[28,484],{},"\nDo favor defining classes over interfaces.",[450,487,488],{},[453,489,490],{},"In later versions of your library, you can safely add new members to classes; you cannot add members to interfaces without breaking existing code.",[12,492,493,494,496],{},"Do use abstract (MustInherit in Visual Basic) classes instead of interfaces to decouple the contract from implementations.",[28,495],{},"\nDo define an interface if you need to provide a polymorphic hierarchy of value types.",[450,498,499],{},[453,500,501,502,506,507,509],{},"Value types must inherit from ",[225,503,505],{"href":504},"http:\u002F\u002Fmsdn.microsoft.com\u002Fen-us\u002Flibrary\u002Fsystem.valuetype.aspx","ValueType",", and can inherit only from ",[225,508,505],{"href":504},", so they cannot use classes to separate contract and implementation. In this case, you must use an interface if your value types require polymorphic behavior.",[12,511,512],{},"Consider defining interfaces to achieve an effect similar to that of multiple inheritance.",[450,514,515],{},[453,516,517],{},"If a type must implement multiple contracts, or the contract is applicable to a wide variety of types, use an interface.",[519,520],"img",{"style":521,"src":522,"alt":38},"display:none;","\u002Farticles\u002Fimages\u002Fsuitcase-bike.jpg",{"title":38,"searchDepth":39,"depth":39,"links":524},[],{},"\u002Farticles\u002Fdesign-guidelines-classes-vs-interfaces",{"title":391,"description":42},"articles\u002Fdesign-guidelines-classes-vs-interfaces",[530],"csharp","3GlliBf0u8RxG37mIAwxdeuY3tHvxAAN16QHnerYJrk",1781574768394]