Inserting a Data View

When the Data Source Catalog is displayed initially, there are no data sources available. To add data sources to the Data Source Catalog, click one of the Add to Catalog links under a data source name. For example, to create a connection to a Microsoft SQL Server database

  1. Expand the Database Connections data source if it is not already expanded.

  2. Click the Add to Catalog link to display the Data Source Properties dialog box as shown in Figure 38.4.

    Figure 38.4. The Data Source Properties dialog box is the interface to create new data source connections.

    graphics/38fig04.gif

  3. Click the Configure Database Connection button to display the Configure Database Connection dialog box as shown in Figure 38.5.

    Figure 38.5. The Configure Database Connection dialog box allows you to connect to any OLE DB compliant data source.

    graphics/38fig05.gif

  4. In the Server Name text box, enter the name of your database server.

  5. In the Authentication section, select the desired authentication method to use to connect to your database and enter a username and password if necessary.

  6. Click Next to go to the next step as seen in Figure 38.6. If the database connection information you provided is not correct, FrontPage will display an error and you will have to correct the connection information before you can proceed.

    Figure 38.6. After entering server information, select the table, view, or stored procedure from the list or create a custom query.

    graphics/38fig06.gif

  7. In the Database dropdown, select the database to use for your connection from the list of databases available on the data source you have connected to.

  8. Select a table, a view, or a stored procedure. If you'd prefer, you can check the Use custom query check box and click Edit to create a custom query. FrontPage will display a text box where you can type in your query.

  9. Click Finish. The Data Source Properties dialog box now contains configuration information for your data source, as shown in Figure 38.7.

    Figure 38.7. The Data Source Properties dialog box is now populated with information on your data source.

    graphics/38fig07.gif

  10. Click OK to add the connection to the Data Source Catalog.

The Data Source Catalog now contains a new entry for your data source. By clicking the data source, you can access the data source menu as seen in Figure 38.8.

Figure 38.8. The data source menu provides access to a lot of functionality.

graphics/38fig08.gif

graphics/troubleshooting_icon.jpg

If you are trying to connect to Microsoft SQL Server running on a computer other than the Web server and you receive an error when trying to connect, see "Cannot Connect to SQL Server" in the "Troubleshooting" section of this chapter.


Instead of jumping right in and inserting your data right away, you might want to review it first and make sure that it shows you what you want. To do that, click the down arrow next to the data source and select Show Data. When you do, you will be taken to the Data View Details task pane, as shown in Figure 38.9. From here, you can review the data your data source connects to, and after you confirm that this is the data you want, you can click the Insert Data View link to insert a Data View of that data onto your Web page.

Figure 38.9. The Data View Details task pane provides a view of your data and much more.

graphics/38fig09.gif

Using the data source menu, you can also choose to save the data source by selecting Save As or email it to someone by selecting Mail Recipient (as Attachment). Both of these options will generate an XML file that contains all the information for the data source. To add the saved data source to FrontPage later, simply copy the XML file into the _fpdatasources/fpdatasources folder in the Web site (which is created when you add a data source to the Data Source Catalog) and recalculate links on the Web site by selecting Tools, Recalculate Hyperlinks.

To insert a new Data View into your Web page, select Insert Data View from the Data View Details task pane or select Insert Data View from the data source menu in the Data Source Catalog. When you do, two things happen. The first is that FrontPage inserts a Data View into your Web page that displays the data as shown in Figure 38.10. The second is that the Data Source Properties link activates in the Data View Details task pane. (If you selected the Insert Data View option from the data source menu in the Data Source Catalog, FrontPage will automatically activate the Data View Details task pane.)

Figure 38.10. A new Data View is inserted into your Web page. This Data View is displaying live data.

graphics/38fig10.jpg



Special Edition Using Microsoft Office FrontPage 2003
Special Edition Using Microsoft Office FrontPage 2003
ISBN: 0789729547
EAN: 2147483647
Year: 2003
Pages: 443

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net