ADO ASP Quiz

Description: ADO ASP Quiz
Number of Questions: 10
Created by:
Tags: asp ado
Attempted 0/10 Correct 0 Score 0

Database connectivity with ADO has 3 main objects:

  1. ADODB.Connection

  2. ADODB.Recordset

  3. ADODB.Command

  4. All of the above


Correct Option: D

What is the sequential procedure in working with databases?

  1. Open the database, interact with the db, close the database

  2. Open a connection, interact with the db, close the connection


Correct Option: B

AI Explanation

To answer this question, you need to understand the sequential procedure in working with databases.

Option A) Open the database, interact with the db, close the database - This option is incorrect because it does not follow the standard procedure for working with databases. Opening and closing the database typically refers to starting and stopping the database service, not establishing and closing a connection.

Option B) Open a connection, interact with the db, close the connection - This option is correct because it outlines the correct sequential procedure for working with databases. To interact with a database, you first need to establish a connection to the database. Once the connection is established, you can perform various operations such as querying data, inserting records, updating records, etc. Finally, after you have completed your tasks, you need to close the connection to release any resources and ensure proper termination.

The correct answer is B) Open a connection, interact with the db, close the connection. This option is correct because it follows the standard procedure for working with databases by establishing a connection, interacting with the database, and then closing the connection when finished.

ActiveX Data Objects (ADO) comes installed with ASP and allows your pages to easily connect to databases. Which two ADO objects are used to open a connection and interact with the database?

  1. Connection object, RecordingSet object

  2. Connection object, Recordset object

  3. Connect object, RecordingSet object

  4. Connect object, Recordset object


Correct Option: B

AI Explanation

To answer this question, you need to understand the ActiveX Data Objects (ADO) and its objects used to interact with databases.

Option A) Connection object, RecordingSet object - This option is incorrect. The correct object names are "Recordset" and "Connection," not "RecordingSet."

Option B) Connection object, Recordset object - This option is correct. In ADO, the Connection object is used to establish a connection with the database, and the Recordset object is used to interact with the data returned from the database.

Option C) Connect object, RecordingSet object - This option is incorrect. The correct object names are "Recordset" and "Connection," not "RecordingSet."

Option D) Connect object, Recordset object - This option is incorrect. The correct object names are "Recordset" and "Connection," not "Connect."

The correct answer is B. This option is correct because the Connection object and Recordset object are the two ADO objects used to open a connection and interact with the database.

What is a connection object?

  1. Specifies whether to use a DSN or DSN-less connection

  2. Specifies which type of database is being used

  3. Specifies the type of driver to use, database format and filename

  4. First opens the initial connection to a database before giving any database information


Correct Option: D

What is a connection string?

  1. Specifies whether to use a DSN or DSN-less connection

  2. Specifies which type of database is being used

  3. Specifies the type of ODBC driver to use, database format and filename

  4. Opens the initial connection to a database


Correct Option: C

There are two methods of connecting to an Access database. Which are they?

  1. DNS, DNS-less

  2. DSN, DSN-less

  3. ODBC, ADO

  4. OLEDB, ADO


Correct Option: B

Which connection method requires a connection object?

  1. DSN

  2. DSN-less

  3. Both


Correct Option: C

Which connection method requires a connection string?

  1. DSN

  2. DSN-less

  3. Both


Correct Option: C

What information can a connection string contain about the database you are trying to connect to?

  1. Type of database

  2. Type of driver to use

  3. Location of database

  4. username

  5. All Of The Above


Correct Option: E

What must your ASP code have if you are using the DSN method of connecting?

  1. Connection object

  2. Connection string

  3. Both


Correct Option: C

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) Connection object - This option is incorrect because while using the DSN method of connecting, you need both a connection object and a connection string.

Option B) Connection string - This option is incorrect because while using the DSN method of connecting, you need both a connection object and a connection string.

Option C) Both - This option is correct because if you are using the DSN method of connecting in ASP code, you need both a connection object and a connection string. The connection object is used to establish the connection to the database server, and the connection string contains the necessary information (such as the DSN name) to establish the connection.

The correct answer is C. This option is correct because when using the DSN method of connecting in ASP code, you need both a connection object and a connection string.

- Hide questions