-
SQL connection (easy)
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.
-
Hi,
You need to add a reference to Microsoft ActiveX Data Objects 2.x to your VB project.
Hope this helps
S@NSIS
-
Ummm...
What if that's not an option in my list of components?
-
Hi,
It won't be in your list of components it will be in your list of references (just above components in the menu).
If it isn't in there you will need to download the latest MDAC from the Microsoft site (currently version 2.6)
Hope this helps
S@NSIS
-
Never Mind
I was looking in components instead of references. You are the man and deserve great rewards of sweet foods and plump women.