Solved

SQLDMO getting server and database names

Posted on 2004-08-16
2
392 Views
Last Modified: 2008-01-09
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?


0
Comment
Question by:bluedaisydawg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 100 total points
ID: 11813640
You should use

#define INITGUID

before including

#include <initguid.h>
0
 
LVL 1

Author Comment

by:bluedaisydawg
ID: 11814541
that did it  - thanks!

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question