Chapter 8: Using the ColdFusion MX Code Compatibility


Instructions for Project Execution

This section describes the detailed instructions to execute the application code provided with this book.

Steps to Create the Database

Perform the following steps to create the database and tables:

  1. Start Microsoft SQL Server Enterprise Manager.

  2. Expand Console Root, Microsoft SQL Server, SQL Server Group, COMPUTER (Windows NT), Databases.

  3. Right-click Databases and select New Database from the pop-up menu to create a new database named BulletinBoard.

  4. Right-click the BulletinBoard database and then select New, Table to create tables in the database. Create two tables: Users and Query. The structure of these tables is specified in Tables 8.1 and 8.2.

    Table 8.1: Structure of the Users Table

    Field Name

    Datatype

    UserName

    Char(10)

    Password

    Char(10)

    Table 8.2: Structure of the Query Table

    Field Name

    Datatype

    UserID

    Char(10)

    Email

    Char(10)

    Subject

    Char(50)

    Message

    VarChar(1000)

    PostingDate

    Datetime

Perform the following steps to import the data from an Excel file to the tables:

  1. Right-click the BulletinBoard database in the Enterprise Manager.

  2. Select All Tasks, Import Data from the pop-up menu. This starts the Data Transformation Services Import/Export Wizard. Click the Next button to proceed to the next screen.

  3. The Choose a Data Source screen appears. Select Microsoft Excel 97–2000 from the Data Source drop-down list and choose the Excel file BulletinBoard.xls. Then click the Next button.

  4. The Choose the Destination screen appears. Click the Next button to continue.

  5. The Specify Table Copy or Query screen appears. This copies the tables in the Excel file to the BulletinBoard database. Click the Next button to continue.

  6. The Select Source Tables and Views screen appears. Select the Query and Users option to import the required tables and click the Next button to continue.

  7. The Save, Schedule, and Replicate Package screen appears. Select the Run Immediately option and then click the Next button to continue.

  8. Click the Finish button to close the wizard.

The Users table contains two usernames and passwords: Rita and rita1 and John and john1. Use these usernames and passwords to test the application.

Steps to Test the Application in ColdFusion 5.0

Perform the following steps to create the data source:

  1. Start ColdFusion Server 5.0 Administrator. This is usually located at http://localhost/CFIDE/Administrator/login.htm, but the location differs depending on the setup.

  2. Enter the administrator password. The main screen appears.

  3. Navigate to ODBC Data Sources under the Data Sources section.

  4. Select Microsoft SQL Server Driver from the ODBC Driver drop-down list to the right of the ODBC Data Sources section.

  5. Enter Forum in the Data Source Name box and then click the Add button to create an ODBC data source for SQL Server by the name Forum.

  6. A Create ODBC Data Source section is displayed. Enter the data source name, SQL Server name, and database name.

  7. Click the Create button to create an ODBC data source for SQL Server.

Perform the following steps to test the application:

  1. Create a directory named BulletinBoard under the wwwroot directory on the Web server.

  2. Copy all the .cfm files and .htm files in the BulletinBoard directory.

  3. Start the browser and open the login.htm page (http://hostname/BulletinBoard/login.htm).

Steps to Test the Application for Compatibility in ColdFusion MX

After the code is tested on ColdFusion Server 5.0, you are ready to install ColdFusion MX. If you are installing ColdFusion MX on the same computer as ColdFusion Server 5.0, first back up all the code in ColdFusion Server 5.0 and then upgrade to ColdFusion MX.

Follow these steps:

  1. After ColdFusion MX is installed, the ColdFusion Administrator automatically starts. The Administrator allows you to migrate the ColdFusion Server 5.0 settings to ColdFusion MX.

  2. Click the Continue button to proceed. After migrating the settings to ColdFusion MX, you are required to enter the password that you provided during the installation. The ColdFusion Administrator is displayed.

  3. Click Code Analyzer in the Debugging and Logging section on the left pane of the ColdFusion MX Administrator. The CFML Code Analyzer is displayed on the right pane of the ColdFusion Administrator. The Code Compatibility Analyzer reviews the CFML pages and then informs you of potential compatibility issues.

  4. Click the Browse Server button to browse the virtual directory, Forum, in the Internet Information Server (IIS).

  5. Click the Run Analyzer button to detect any unsupported and deprecated CFML features. It displays a CFMX Code Compatibility Report with the current date and time and number of errors that the analyzer detected.

After you perform the preceding steps, you can test the application. To do so, start the browser and open the login.htm page in the BulletinBoard directory (http://hostname/BulletinBoard/login.htm).

In this chapter, you'll learn about the Code Compatibility Analyzer component that's used to test the compatibility of the ColdFusion 5.0 applications with ColdFusion MX. In addition, you'll learn about the Migrating Settings wizard, which is used to migrate the settings of ColdFusion applications to Coldfusion MX.

You'll also learn how to migrate CFML elements that have been either modified or made obsolete in ColdFusion MX. Finally, you'll learn about the localization settings used in ColdFusion MX.




Macromedia ColdFusion MX. Professional Projects
ColdFusion MX Professional Projects
ISBN: 1592000126
EAN: 2147483647
Year: 2002
Pages: 200

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