1 READY In programs, the READY statement explicitly declares your intention to access one or more databases and causes an attach to the database. READY is not available in RDO. You do not have to use READY to access a database. A database is readied automatically the first time you refer to it. However, you do need an INVOKE DATABASE statement. If you issue a READY statement without specifying a database handle, Oracle Rdb opens all databases declared in that module. 2 More You need the Oracle Rdb READ privilege for the database to use the READY statement. You can use the READY statement to test the availability of a database. For example, you may want to check availability before your program prompts a user for input. 2 Format (B)0READY qqqwqqqq>qqqqqqqqqqqqqqwqqqwqqqq>qqqqqqqqqqqqqwqqqqq> mqwqq> db-handle qwqj mqqqq> on-error qqqj mqqqqqq , DATABASE PERS = FILENAME "WORK$DISK:PERSONNEL"; . . main () { READY PERS; . . . FINISH PERS; Pascal Program program empupdate; DATABASE PERS = FILENAME 'WORK$DISK:PERSONNEL'; . . . begin READY PERS; . . . FINISH PERS; Example 2 The following program fragments demonstrate how to open two databases within the same program. The program fragments: o Use the DATABASE statement to declare two databases, PERSONNEL and PAYROLL o Declare database handles for both databases o Open both databases o Close each database C Program #include DATABASE PERS = FILENAME "WORK$DISK:PERSONNEL"; DATABASE PAY = FILENAME "WORK$DISK:PAYROLL"; main () { . . . READY PERS; . . . FINISH PERS; . . . READY PAY; . . . FINISH PAY; . . . READY PERS, PAY; . . . FINISH PERS, PAY; Pascal Program program new_employee; DATABASE PERS = FILENAME 'WORK$DISK:PERSONNEL'; DATABASE PAY = FILENAME 'WORK$DISK:PAYROLL'; . . . READY PERS; . . . FINISH PERS; . . . READY PAY; . . . FINISH PAY; . . . READY PERS, PAY; . . . FINISH PERS, PAY;