【正文】
. The data source name(DSN) for the database is MERCTOURS_TESTDATA. the testcase CARTOONBESTBUDDIES located in C:\TRAINING\QTPADVANCED\TESTS. the test by using FILESAVE AS to create a new test named GETDATAFROMDB. action in the script do you need to update for this exercise? the VBScript code to open a connection to the Access database. SQL to retrieve the departure cities data is select city From SQL to retrieve the arrival cities data is Select City From Arrival_Cities. Note: The MERC_TESTDATA database has two tables,Departure_Cities and tables have a column named CITY. Exercise:Retrieving Data From a database will you store the results returned by the queries? the VBScript code to clean up the connection and results objects. the test with code to achieve the given objective. and debug the updated test. If your test did not plete successfully, use the QTP debug features to help pinpoint the script’s trouble areas. Exercise:Retrieving Data From a database Part 4:Update the script for the second objective 1. Update the test with the code necessary to validate purchases for each bination of departure and arrival cities. Note: For the purpose of training, in order to reduce the number of the binations, it is fine to use just the first three departure cities and the last three arrival cities instead of the full lists. 2. Run and debug the updated test. If your test did not plete successfully, use the QTP debug features to help pinpoint the script’s trouble areas. Check with you instructor if problems persist. 。Chapter 8 Retrieving External Data Objectives After pleting this chapter, you will be able to: ? Build scripts that access data from external sources. ? Import data from an Excel spreadsheet. ? Use the connection and RecordSet objects to query a database. ? Read and output information to text fi