GREATPROOFSET.COM

proof of pregnancy papers - www.greatproofset.com

Menu


11. In Dreamweaver, click the Refresh button. Immediately, Dreamweaver recognizes the new DSN and lists it in the Databases panel


similar to Figure 25.10. Figure 25.10. The connDorknozzle DSN appears in the Databases list. Expand the tree to see the list of tables within the database. As you can see, establishing communication between the DSN and Dreamweaver is pretty straightforward. You can expand the Tables node in the connDorknozzle tree to see a visual representation of the database tables in Dreamweaver. As we progress through the chapter, I'll show you how you can use information made available in this panel group to create dynamic sites. Connecting an ASP.NET Web Application Using OLE DB As you discovered in an earlier section, a DSN-less connection does not require an actual Data Source Name. As a matter of fact, ODBC itself is a mere translator that relies on OLE DB to make the connection. A more efficient way to communicate with the database is directly through OLE DB. An OLE DB connection looks similar to a custom connection string. The exception is that only the Provider parameter, not the Driver parameter, is included. Here's what an OLE DB connection string would look like, based on a Microsoft Access database called Dorknozzle.mdb:   Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Inetpub\wwwroot\DorknozzleASPX\Database\Dorknozzle.mdb;   When working with the ASP.NET server model, you are essentially required to use an OLE DB (DSN-less) connection if you plan on connecting to an Access database. Of course, leave it up to Dreamweaver to make the process simple. To create an OLE DB connection for ASP.NET in Dreamweaver, follow these steps: 1. If you haven't done so already, open the employeestore.aspx file by double-clicking it in the Site Files list. 2. Make sure that the Database panel is open by choosing Window, Database. 3. Click the Add (+) button and choose the OLE DB Connection option from the menu. The OLE DB Connection dialog appears, as shown in Figure 25.11. Figure 25.11. The OLE DB Connection dialog offers a large area for you to type in a custom connection string. [View full size image] 4. Type the name connDorknozzle in the Connection Name text box. 5. Type the connection string outlined in the introduction of this section within the Connection String multi-line text box. If you want to avoid typing the connection string, you can manually build it by clicking the Build button (Windows only). This action launches the Data Link Properties dialog shown in Figure 25.12 and allows you to walk through a wizard that fills in the required connection string information. Figure 25.12. The Data Link Properties dialog offers an easier way to create complicated connection strings. 6. Alternatively, you can click the Template button to launch the Connection String Template dialog similar to Figure 25.13. From this dialog, you can select a connection string template such as the Microsoft Access 2000 template. Click OK to see the connection string template complete with options for you to enter necessary values. Figure 25.13. The Connection String Template dialog allows you to select from a connection string template. 7. Either method you choose produces the same results. When you've populated the connection string, click the Test button to make sure that the connection was established properly. Dreamweaver displays a message informing you of the status of the connection.