Difficulty: Easy
Correct Answer: Incorrect
Explanation:
Introduction / Context:
Classic ADO exposes a Connection object that represents an open connection to a data source. It also exposes an Errors collection that contains provider-specific errors for the most recent operation on that connection. This question asks whether the Connection is created after the Errors object, which would invert the normal lifecycle.
Given Data / Assumptions:
Concept / Approach:
The normal sequence is to instantiate a Connection object (CreateObject or new ADODB.Connection), set its properties, and call Open. Only after executing operations can the Errors collection be populated with any generated errors/warnings. Therefore, the statement that the Connection is created after the Errors object is incorrect; the Errors collection logically belongs to the Connection and is populated post-operation.
Step-by-Step Solution:
Verification / Alternative check:
Write a minimal script that opens a bad connection string, catches the error, and inspects Connection.Errors to confirm that entries exist after, not before, the operation.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing ADO and ADO.NET; expecting a global “Errors” object independent of any Connection; forgetting to clear or re-inspect Errors after each operation.
Final Answer:
Incorrect
Discussion & Comments