ADO & SQLServer Provider

Question:
When opening an ADO connection, how do I specify that it use the SQL Server OLEDB provider with a DSN?

Answer:
Here’s the connection string you should use. Be sure to substitute in the appropriate values following the equal signs.

"Provider=SQLOLEDB;" _& "Data Source=serverName;" _& "Initial Catalog=databaseName;" _& "User ID=userName;" _& "Password=userPassword;"
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: