Link to home
Start Free TrialLog in
Avatar of bluedaisydawg
bluedaisydawg

asked on

SQLDMO getting server and database names

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?


ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bluedaisydawg
bluedaisydawg

ASKER

that did it  - thanks!