DSN, DSN-less and OLEDB Connections, Which One?

When connecting a database, DSN-less connections are superior to System DSN connections in performance. However, there will be no noticeable improvement in performance for smaller sites which have few concurrent connections only.

Although a DSN-less connection is operationally identical to a DSN but it doesn't have to access registry during connecting process. For DSN-less connection, all required information will be specified in the connection string instead of storing in registry.

In practice, youre recommended to use OLEDB connections over these two type of connections. Why? Its because OLEDB can provide better performance in database connections and faster access to data.

The Connection String for OLEDB would be:

"Provider=ProviderName; Data Source=DatabaseSource; Initial Catalog=DatabaseName; User ID=UserID; Password=Password"

Add Feedback