
|
Example1: Connecting to a Database Once you have connected to the projects server using the ftp to sftp bridge connection through mindterm, you are now ready to begin developing web applications. This example will show you how to connect to the database that you recently created on the server using Microsoft SQL Server. 1. First you must create a new site. In order to do this, use the site menu and select the New Site option 2. Once you select new site, click the Advanced tab at the top. There are three sections that we will be working with from the Advanced Menu. Each section is located on the side panel. You should currently be in the Local Information section which is the first section. If not click it. In this section, you are able to create a name for you site and you can have Dreamweaver point to a local folder, either on your desktop or anywhere you like, in which your work will be saved on the computer. See the screenshot below: 3. Once you have completed the local info, you are ready
to fill in the remote info. This is the information that is similar
to the local info, except this will provide information for Dreamweaver
to communicate with the server instead of your computer. In this section,
you will see a drop down menu, called Access, initially
set to none. Change this to FTP because this is how we are accessing
the server. The FTP Host should be 127.0.0.1(for mac users its 127.0.0.1:2121)
instead of projects.coe.uga.edu because the mindterm connection creating
the "bridge." So in essence you are connection the the gateway
which allows access to Projects. 4. After the remote info, you are now ready to enter the information for the Testing Server section. Here, everything is practically the same as the Remote info, except you have a Server Model drop box. There are various that you can choose from, but to be consistent with the example, we will select ASP JavaScript. Under this, you will select FTP access, with the FTP host being 127.0.0.1(mac users it would be 127.0.0.1:2121). No Host Directory is needed here because you have provided that information in the Remote Info. Use the same login and password information for Projects. The URL prefix of the site that you are working on will be the URL of your site when you finish. For example, if mmixon is working on a site, then this person's url prefix will be 'http://projects.coe.uga.edu/mmixon.' See the Screenshot below: 5. Once you have done all of this, click ok and now we are ready to create a Database connection to the Microsoft SQL database on the server. On the right panel, somewhat in the center of the panel, you will see four tabs that says Databases, Bindings, Server Behavior, and Components. Click the Databases tab. Once the tab is selected, you will see a Create a Database connection (+) symbol, and a Delete a database connection (-) symbol. Click the (+) and select Custom Connection String. 6. Here, you will insert the string you need to connect
to the database. Under connection name, you can call it anything you want.
Under Connection string, For Microsoft SQL Database, you will insert the
following string: Then you will use the driver on the testing server so make sure the appropriate item is selected. If you are connecting to a database that has a Data Source Name (DSN), then instead of clicking the "Connection String" once the plus sign is clicked, scroll to "Data Source Name": Once you've selected this option, click the DSN button and a list of databases will show up: Once you have selected the proper database, you may login to the database and continue. After you test the connection, click ok and you are ready to develop pages using your database. Click here to return to the previous page. |