Multiple choice asp ado

Which connection method requires a connection object?

  1. DSN

  2. DSN-less

  3. Both

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

Both DSN and DSN-less connection methods require creating an ADO Connection object. The difference is in how the connection string is specified. With DSN, the connection string references a pre-configured Data Source Name. With DSN-less, the connection string contains all parameters (driver, database path, etc.) directly. In both cases, you use 'Set conn = Server.CreateObject("ADODB.Connection")' to create the connection object.