Multiple choice technology testing

what command is used to connect with Database?

  1. dbconnect(“connectivity name”)

  2. dbopen(“connectivity name”)

  3. Createobject(“connectivity name”)

  4. CreateConn("connectivity name")

  5. None of the above

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

In QTP/UFT and VBScript, you use CreateObject to instantiate database connection objects like ADODB.Connection. For example: Set dbConn = CreateObject("ADODB.Connection"). This creates a COM object that can then connect to databases using connection strings. The other options (dbconnect, dbopen, CreateConn) are not standard VBScript or QTP commands for database connectivity.