Export (0) Print
Expand All

Step 1: Connect to the AdventureWorks2000 Database

SharePoint 2007

This topic explains how to define the XML for the LobSystem and LobSystemInstance objects to connect to the AdventureWorks2000 database. For simplicity, the sample XML provided in this topic uses PassThrough authentication. For a more complex sample using single sign-on (SSO), see Step 7 (Optional): Use Single Sign-On to Connect to the AdventureWorks2000 Database.

The LobSystem object is the top-level container for metadata that describes a particular business application. In XML terms, it is the root node that contains all other metadata objects. The LobSystemInstance object under the LobSystem object provides authentication and connection string information to the Business Data Catalog.

The Business Data Catalog supports the following database authentication modes:

  • PassThrough

  • RevertToSelf

  • RdbCredentials

  • WindowsCredentials

For more information, see Business Data Catalog Authentication.

Before you write metadata, you must set up your environment. This example assumes you have Microsoft Office SharePoint Server 2007 already set up and that you have installed the AdventureWorks2000 sample database.

The default installation of Microsoft SQL Server 2000 does not include the AdventureWorks2000 database. Download the AdventureWorks2000 sample database from the Microsoft Download Center. You should install the AdventureWorks2000 database on the same computer on which Office SharePoint Server 2007 is installed.

  1. Create a text file and save it as AdventureWorks2000.XML. Location of the file does not matter.

  2. Open the text file for editing in your text editor.

  3. Insert the following XML:

    <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
    <!-- This metadata XML defines three entities: Product, Customer, 
    and SalesOrder from the AdventureWorks 2000 Sample database.-->
    <LobSystem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog BDCMetadata.xsd" Type="Database" 
    Version="1.0.0.0" Name="AdventureWorksSample" 
    xmlns="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog">
      <Properties>
        <Property Name="WildcardCharacter" Type="System.String">%</Property>
      </Properties>
      <LobSystemInstances>
        <LobSystemInstance Name="AdventureWorksSampleInstance">
          <Properties>
            <Property Name="AuthenticationMode" 
    Type="System.String">PassThrough</Property>
            <!--AuthenticationMode can be set to PassThrough, 
            RevertToSelf, RdbCredentials, or WindowsCredentials. -->
            <Property Name="DatabaseAccessProvider" 
    Type="System.String">SqlServer</Property>
            <!-- Can be SqlServer, OleDb, Oracle, or Odbc for database 
            systems. -->
            <Property Name="RdbConnection Data Source" Type="System.String">EnterYourAdventureWorks2000ServerNameHere</Property>
            <!-- The name of your server hosting the AdventureWorks2000 
                 database or the name of the SQL Server instance in the 
                 format SQLServer\Instance. -->
            <Property Name="RdbConnection Initial Catalog" 
    Type="System.String">AdventureWorks2000</Property>
            <!-- The name of the database.> -->
            <Property Name="RdbConnection Integrated Security" 
    Type="System.String">SSPI</Property>
            <Property Name="RdbConnection Pooling" 
    Type="System.String">false</Property>
          </Properties>
        </LobSystemInstance>
      </LobSystemInstances>
      <Entities>
        <!-- Enter your Entity XML here -->
      </Entities>
    </LobSystem>
    
  4. In the LobSystemInstance metadata, replace the name of the SQL Server that hosts the AdventureWorks2000 database in the RdbConnection Data Source property accordingly. If you use a SQL Server instance, use the format SQLServer\Instance.

  5. Save the XML file.

Community Additions

ADD
Show:
© 2015 Microsoft