SQLDMO getting server and database names
Posted on 2004-08-16
I need to make list boxes with the server and database names similar to what happens when you open query analyzer etc. I found some code that would help me do this but the problem is that when I compile I get this error:
error LNK2001: unresolved external symbol _CLSID_SQLDMOApplication
error LNK2001: unresolved external symbol _CLSID_SQLDMOServer
error LNK2001: unresolved external symbol _IID_IWSQLDMOApplication
error LNK2001: unresolved external symbol _IID_IWSQLDMOServer
fatal error LNK1120: 4 unresolved externals
I tried going into the references for my project and adding SQLDMO but it didn't help. I have included these files:
#include "C:\PROGRAM FILES\MICROSOFT SQL SERVER\80\TOOLS\DEVTOOLS\INCLUDE\sqldmoid.h"
#include "C:\PROGRAM FILES\MICROSOFT SQL SERVER\80\TOOLS\DEVTOOLS\INCLUDE\sqldmo.h"
I had to copy them off the cd though as I could not find them on my machine... I have sqldmo.dll on my machine though - I guess I assumed that the stuff it would need to link to was in there?