Multiple choice technology programming languages

Which of these is used to open an database?

  1. Set dbMyDB = OpenDatabase

  2. Set dbMyDB = OpenDatabase("MyDatabase.mdb")

  3. dbMyDB = OpenDatabase("MyDatabase.mdb")

  4. None of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To open a database in VB, you need to use Set dbMyDB = OpenDatabase("MyDatabase.mdb") with both the Set statement and the database path parameter. The Set statement is required for object variables.