Run-Time Differences in the Commerce Server 2007 Orders System
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
The following list describes some issues that occur when you run Commerce Server 2002 site code in Commerce Server 2007. The following issues will not occur at compile time. We recommend that you perform code reviews of your site code and test the code to find instances of these issues.
As noted in API Changes Made to the Orders System, strongly typed string properties in Orders System classes in Commerce Server 2007 implement length-checking on string inputs. The properties throw an ArgumentException when the string is longer than the precision of the corresponding column used in mapped storage. This behavior can be a problem for site code that was relies on the implicit truncation behavior in Commerce Server 2002.
If your site code sets strongly typed property values by using the equivalent dictionary key, you must change that code to use the strongly typed property. For example, if your site code sets FirstName by using the syntax myOrderAddress["first_name"] = stringNameValue, you must change it to myOrderAddress.FirstName = stringNameValue to prevent a run-time PropertyConflictException from being thrown by the indexer of the OrderAddress class. Other important cases that cause this behavior include the following constructs:
LineItem ["cy_placed_price"] This has been replaced by the PlacedPrice property.
LineItem ["cy_iadjust_regularprice"] This has been replaced by the ListPrice property.
LineItem ["cy_oadjust_adjustedprice"] This has been replaced by the ExtendedPrice property.
Review your exception-handling code to determine whether you are catching appropriate Orders System exceptions when you use class properties and methods. For information about each property and method for the new list of exceptions thrown in each case, see the Microsoft.CommerceServer.Runtime.Orders class documentation. Because the more specific exceptions thrown by the Orders System classes provide more information, we do not recommend continuing to catch CommerceOrderSystemException or CommerceException.
Change code that uses the PipelineInfo class to use the new constructor PipelineInfo(string, OrderPipelineType). This constructor provides the Orders System classes with more information about how the PipelineInfo instance will be used. Also, call Dispose for PipelineInfo instances to release resources.