ShippingMethodManager.GetInstalledMethodList Method (PIA)

Use this method to get a list of the current shipping methods. The GetInstalledMethodList method allows you to filter the list, select the columns to return, and sort the list into a particular order.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Orders
…
Public Function GetInstalledMethodList(ByRefFilter As Object,
  ByRefOrderBy As Object,
  ByRefcolumns As Object) As Object

[C#]

using Microsoft.CommerceServer.Interop.Orders;
…
public object GetInstalledMethodList(ref objectFilter,
  ref object OrderBy,
  ref object columns);

Parameters

[Visual Basic .NET]

  • Filter
    A String that becomes the WHERE clause of the query. Pass null if no filtering is wanted. An example filter is "enabled = 1", which will cause the GetInstalledMethodList method to return only enabled shipping methods.
  • OrderBy
    A String that becomes the ORDER BY clause of the query. Pass a null if no ordering is wanted. An example OrderBy argument is "shipping_method_name", which will cause the results to be sorted by shipping method name.
  • columns
    A System.Array of column names of the values to retrieve. If an empty array is passed, all columns from the ShippingConfig table are returned.

[C#]

  • Filter
    A reference to an object that contains a string that becomes the WHERE clause of the query. Pass a null value (DBNull.Value) if no filtering is wanted. An example filter is "enabled = 1", which will cause the GetInstalledMethodList method to return only enabled shipping methods.
  • OrderBy
    A reference to an object that contains a string that becomes the ORDER BY clause of the query. Pass a null value (DBNull.Value) if no ordering is wanted. An example OrderBy argument is "shipping_method_name", which will cause the results to be sorted by shipping_method_name.
  • columns
    A reference to an object that contains a System.Array of column names of the values to retrieve. If an empty array is passed, all columns from the ShippingConfig table are returned.

Return Values

[Visual Basic .NET] If this method completes successfully, it returns a Recordset object that contains the results of the query.

[C#] An object containing an ADO Recordset object with the wanted values.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

Remarks

The GetInstalledMethodList method constructs a SQL query from its three parameters, runs it against the current ShippingConfig table, and returns the result in an ADO Recordset object.

[Visual Basic .NET]

Example

' oSMM is an initialized Commerce.ShippingMethodManager object
' sFilter is set to filter
' sOrderBy is set to null, so there will be no ordering
' AColumns is an array of column names of the values to retrieve
' rsMethodList is a recordset
Dim aColumnNames() As Object
aColumnNames(0) = "shipping_method_name"
rsMethodList = oSMM.GetInstalledMethodList( "enabled = 1", _
                                            System.DBNull.Value, _
                                            aColumnNames)

Requirements

Namespace: Microsoft.CommerceServer.Interop.Orders

Platforms: Windows 2000, Windows Server 2003

Assembly: cs_shipmgr (in cs_shipmgr.dll)

See Also

Splitter

Shipping Class

ShippingDiscountAdjust

ShippingManagerCache

ShippingMethodManager Class

ShippingMethodRouter

StepwiseShipping

Copyright © 2005 Microsoft Corporation.
All rights reserved.