Everybody seems to use connections like this for SQL Server:

<code>
dim objCN as ADODB.Connection
set objCN = new ADODB.Connection

objCN.Open "Provider=SQLOLEDB;Data Source=Server Name;UID=UserName;PWD=Password;Database=MyDatabase"
</code>

When I try to run it, I get an user-defined type not defined error. I think I just need to add the right component to my project, but don't know which one. Please help. Thank you all.