Thursday, February 18, 2010

Modify the data source properties of an existing database connection


After you configure a database connection, you can later modify the connection at any time. For example, you might want to create a new query, modify an existing one, or create a custom SQL statement.

  1. On the Task Panes menu, click Data Source Library.
  2. In the Data Source Library, click the database connection that you want to modify, and then click Properties.
    If the database connection uses a custom SQL query, the Data Source Properties dialog box looks like the one in the following illustration.
    Data Source Properties dialog box with the Edit Custom Query button
    If the database connection does not use a custom SQL query, the Data Source Properties dialog box looks like the one in the following illustration.
    Data Source Properties dialog box with the Query section
  3. In the Data Source Properties dialog box, do any of the following:
    • If there is a Query area with buttons, click those buttons to add or remove fields or to create or modify a filter or sort order.
    • If there is a Query area with buttons, click Configure Database Connection to apply a custom SQL query to the connection. After you click Configure Database Connection, click Next.
       IMPORTANT   Because SQL authentication saves the user name and password as text in the data connection, any user with permission to open the site in Office SharePoint Designer 2007 can view these credentials. A security warning informs you that the user name and password are saved as text in the data connection and that other site members can access this data source. If you want other site members to access the database by using the same user name and password, click OK. If you do not want other site members to access the database by using the same user name and password, click Cancel. If your site is located on a server running Office SharePoint Server 2007, you can talk to your server administrator about configuring Single Sign-On, and then see the later section Connect to a database by using Single Sign-On authentication.
      In the Configure Database Connection dialog box, click Specify custom Select, Update, Insert, and Delete commands using SQL or stored procedures, and then click Finish.
      The Edit Custom SQL Commands dialog box opens. In this dialog box, you can create your custom SQL statement. For more information, seeCreate custom SQL commands earlier in this article.
    • If there is an Edit Custom Query button, click it to open the Edit Custom SQL Commands dialog box, where you can add, modify, or delete custom SQL statements.

No comments: