FAQ: Business Data Catalog

This topic contains answers to commonly asked questions when working with the Business Data Catalog and the Business Data features. This topic is by no means complete and will be refreshed periodically with your questions.

Question: Added metadata, but unable to see entities in the Entity Picker?

Question: Where is the BdcMetadata.XSD file located?

Question: What is "Application Registry" in the Business Data Catalog object models?

Question: How can I get security trimmed results from a back-end method invocation?

Question: In what scenarios would I grant View permission on an entity without giving any permission on the application?

Question: Can I use GUIDs in the metadata?

Question: Where are the server logs? How can I use them to troubleshoot errors?

Question: How can I display a database field of type BLOB that stores image data via the Business Data Catalog?

Question: Is it possible to have more than one connection to a database or a Web service within a single application definition file? Is it possible to have associations between entities located inside different application definition files?

Question: How do I make the Business Data Picker dialog display multiple fields?

Question: Added metadata, but unable to see entities in the Entity Picker?

Business data in lists and Business Data Web Parts are driven by Business Data Catalog permissions. The minimum permission you need on an entity to use it in clients is the Selectable in Clients right.

Note   Because Business Data Catalog is a Shared Service that is shared across site collections, site collection level security settings cannot be applied to it. Therefore, Site Settings has little relationship with Business Data Catalog permissions.

Question: Where is the BdcMetadata.XSD file located?

The Business Data Catalog provides a schema definition file (XSD) that defines the schema allowed in the XML file, and that defines the metadata for a business application. It is important for the XML documents to adhere to this schema.

You can find the BdcMetadata.XSD file in the \Bin directory of your Microsoft Office SharePoint Server 2007 installation, typically at <Root>\Program Files\Microsoft Office Server\12.0\Bin.

When authoring metadata in Microsoft Visual Studio 2005, copy the .xsd file to the working folder and set the SchemaReference attribute in the XML file to point to the .xsd file in the working folder. As a result, Visual Studio provides IntelliSense, which greatly simplifies editing.

Question: What is "Application Registry" in the Business Data Catalog object models?

The Business Data Catalog was originally named "Application Registry". That's why you see "Application Registry" in the namespace names and in the object model. When you see the name "Application Registry" in these contexts, you can assume it is the same as Business Data Catalog.

Question: How can I get security trimmed results from a back-end method invocation?

See Business Data Catalog Security Trimmer and AccessChecker Samples for details.

The UserContext****filter limits the instances returned by a method to the current user’s context. This filter tells the Business Data Catalog to append the current Microsoft Windows user’s domain name and user name to the method call.

If a metadata author creates metadata that takes a user name as a user-controllable filter and returns sensitive personal data, a user may see another user's data. To avoid this, use the UserContext filter to pass in the user name to the method call.

For more information, see FilterDescriptor.

Question: In what scenarios would I grant View permission on an entity without giving any permission on the application?

There are valid scenarios in which you may want to give a user View permissions on an entity without giving that user any permissions on the application. Consider the case of delegated administration. The Business Data Catalog allows an administrator to delegate the administration of any object to another user. For example, he or she (domain\admin) may authorize domain\xyz to administer Entity ABC. She does this by giving domain\xyz the Set Permissions right to Entity ABC. Domain\xyz can now give himself the View permission, which enables him to view data (entity instances) for that entity. Domain\xyz does not need to have any rights on other objects (such as the application or other entities in the application).

The View permission controls the user's ability to view the data associated with the entity, in contrast to the user's ability to view all metadata objects all the time. The applications and entities are viewable in the UI by default. The View permission is equivalent to having the Execute permission to execute methods on an entity or an entire application.

Question: Can I use GUIDs in the metadata?

GUIDs are first-class Business Data Catalog primitives. They can be used as Properties, DefaultValues, and Identifiers.

Question: Where are the server logs? How can I use them to troubleshoot errors?

If you get an error when you try to use a Business Data Web Part, a Business Data column, or the object model, enable diagnostic logging in Central Administration and check the Windows Event Viewer, or the Unified Logging Service (ULS) server log files. The Business Data Catalog writes messages and run-time exceptions to the event Log and in ULS log files.

The ULS log files contain a copy of the event log information and the stack trace. As a result, you may find the event logs are friendlier to use and understand than the ULS log files. However, if you need detailed information to debug the error, ULS log files may come in handy.

The Business Data Catalog creates a ULS log file every 30 minutes. You can find the log files in the following path: <drive>\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS. ULS log files contain useful information about all the run-time exceptions and can help you identify problems. In the ULS log files, messages are categorized and contain the following fields:

  • Timestamp

  • PID: Web client errors appear under the w3wp.exe PID. Search and user profile import errors appear under mssdmin.exe PID.

  • TID

  • Product

  • Category: (the Category field is Business Data for Business Data Catalog–related errors)

  • EventID

  • Level

  • Message

  • Correlation

An easy way to find Business Data Catalog–related messages is to search for "metadataexception", "ApplicationRegistry", or "Exception" in the Message field, and then look under the Business Data category.

See Warnings and Error Messages for some common error messages and their workarounds.

Question: How can I display a database field of type BLOB that stores image data via the Business Data Catalog?

This is not supported. In SharePoint Server 2007, Business Data Catalog does not provide BLOB support for databases.

Question: Is it possible to have more than one connection to a database or a Web service within a single application definition file? Is it possible to have associations between entities located inside different application definition files?

No and no. A single application definition file can connect to just one database or a Web service. Also, both SourceEntity and DestinationEntity objects in an association should exist in the same LobSystem object.

Question: How do I make the Business Data Picker dialog display multiple fields?

Use the ShowInPicker property of the TypeDescriptor element in the required fields of the return parameter.

ShowInPicker

System.Boolean

No

false

true

false

If this property is set to true in a field of a return parameter, then that field is displayed in the business data picker. Business Data Catalog displays all fields that have the "ShowInPicker" property defined, plus the title field in the business data picker. If there are none, it displays only the identifier field.

Here is an example:

         <Parameter Direction="Return" Name="Employees">
              <TypeDescriptor TypeName="System.Data.SqlClient.SqlDataReader, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="EmployeeDataReader">
                <TypeDescriptors>
                  <TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="EmployeeDataRecord">
                    <TypeDescriptors>
                      <TypeDescriptor TypeName="System.Int32" IdentifierName="EmployeeId" Name="EmployeeId">
                        <Properties>
                          <Property Name="ShowInPicker" Type="System.Boolean">true</Property>
                        </Properties>
                      </TypeDescriptor>
                      <TypeDescriptor TypeName="System.String" Name="EmployeeFirstName">
                        <Properties>
                          <Property Name="ShowInPicker" Type="System.Boolean">true</Property>
                        </Properties>
                      </TypeDescriptor>
                      <TypeDescriptor TypeName="System.String" Name="EmployeeLastName">
                        <Properties>
                          <Property Name="ShowInPicker" Type="System.Boolean">true</Property>
                        </Properties>
                      </TypeDescriptor>
                      <TypeDescriptor TypeName="System.Double" Name="Telephone">
                        <Properties>
                          <Property Name="HideInItemWebPartByDefault" Type="System.Boolean">true</Property>
                          <Property Name="HideInListWebPartByDefault" Type="System.Boolean">true</Property>
                        </Properties>
                      </TypeDescriptor>
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>