Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Support for Nullable Types in the Business Data Catalog

SharePoint 2007

The only generic type supported by the Business Data Catalog is System.Nullable, for which support is special cased. This means that structures exposed by your back-end Web service cannot contain generic types other than System.Nullable.

The TypeName format for a TypeDescriptor that describes a Nullable member is: "System.Nullable when TypeName is a primitive (for example, Int32). Note the double brackets, [[ and ]].

The TypeName format for a TypeDescriptor that describes a Nullable member whose type comes from the Web service, such as an Enum, is "System.Nullable[[ TypeName, LobSystemName ]].

Business Data Catalog supports System.Nullable both as input to Web service methods and reading output from Web service methods. However, Web Parts and Business Data columns in lists internally use Microsoft ADO.NET DataTables to render data returned by the Business Data Catalog, and DataTables do not support column types that are System.Nullable. As a result, if you have Nullable members returned by your Web service, you have two choices:

Model the field in the Business Data Catalog as a non-nullable type, even though the Web service is returning Nullable.

Model the field as having complex formatting and specify the Nullable field as a subfield of the primary Business Data Catalog field.

Community Additions

© 2015 Microsoft