473,396 Members | 1,749 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Adding a reference in Visual C++ .NET

Hello, All,

It would be greatly appreciated if someone could throw me
the bone on this question! I'm working on a project in
Visual C++ .NET. I'm trying to generate a list of SQL
servers that reside on my domain. For this to happen, I
must add a reference to SQLDMO to my project. After I
add the reference, I try to use the components library
but errors when compiled.

//Code
private: void SqlServerList()
{
SQLDMO.SQLServer gSQLServerDMO = new
SQLDMO.SQLServer();
}

//Error
d:\My Documents\Visual Studio
Projects\BugsNet\DbSetupFrm.h(78): error
C2065: 'SQLDMO' : undeclared identifier

What's really bothering me is I found an example that
someone did in Visual Studio .NET but using C#. I
downloaded the project, added the reference and this time
Visual Studio had no problem compiling.

Far as I can tell adding a reference in Visual C# is the
same as in Visual C++. HMMMM?

Thanks, for any feedback!

Nov 16 '05 #1
2 5579
If SQLDMO is the namespace this is in, it at least needs to be
SQLDMO::SQLServer (the scope operator '::' instead of '.').

Ronald Laeremans
Visual C++ team

"Neil Guyette" <ng******@gemssensors.com> wrote in message
news:03****************************@phx.gbl...
Hello, All,

It would be greatly appreciated if someone could throw me
the bone on this question! I'm working on a project in
Visual C++ .NET. I'm trying to generate a list of SQL
servers that reside on my domain. For this to happen, I
must add a reference to SQLDMO to my project. After I
add the reference, I try to use the components library
but errors when compiled.

//Code
private: void SqlServerList()
{
SQLDMO.SQLServer gSQLServerDMO = new
SQLDMO.SQLServer();
}

//Error
d:\My Documents\Visual Studio
Projects\BugsNet\DbSetupFrm.h(78): error
C2065: 'SQLDMO' : undeclared identifier

What's really bothering me is I found an example that
someone did in Visual Studio .NET but using C#. I
downloaded the project, added the reference and this time
Visual Studio had no problem compiling.

Far as I can tell adding a reference in Visual C# is the
same as in Visual C++. HMMMM?

Thanks, for any feedback!

Nov 16 '05 #2
Thanks, Ronald,

I was aware of the scope operator, I just wrote the
example wrong for the posting. I figured out my problem,
I needed to include the parent namespace of SQLDMO which
is Interop::SQLDMO.

Thanks again for your time

-Neil
-----Original Message-----
If SQLDMO is the namespace this is in, it at least needs to beSQLDMO::SQLServer (the scope operator '::' instead of '.').
Ronald Laeremans
Visual C++ team

"Neil Guyette" <ng******@gemssensors.com> wrote in messagenews:03****************************@phx.gbl...
Hello, All,

It would be greatly appreciated if someone could throw me the bone on this question! I'm working on a project in
Visual C++ .NET. I'm trying to generate a list of SQL
servers that reside on my domain. For this to happen, I must add a reference to SQLDMO to my project. After I
add the reference, I try to use the components library
but errors when compiled.

//Code
private: void SqlServerList()
{
SQLDMO.SQLServer gSQLServerDMO = new
SQLDMO.SQLServer (); }

//Error
d:\My Documents\Visual Studio
Projects\BugsNet\DbSetupFrm.h(78): error C2065: 'SQLDMO' : undeclared identifier
What's really bothering me is I found an example that
someone did in Visual Studio .NET but using C#. I
downloaded the project, added the reference and this time Visual Studio had no problem compiling.

Far as I can tell adding a reference in Visual C# is the same as in Visual C++. HMMMM?

Thanks, for any feedback!

.

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Roy Riddex | last post by:
How do I add to a date? I thought the following code would work but it doesn't like it. I'm trying to add 6 months (182 days) onto a date. Option Explicit Private Sub Form_Load() Dim Answer...
5
by: Richard | last post by:
I don't know any thing about c#, I really need to do this in visual c++. I don't manually wrap the dll but since it's called AxInterop.OWC10.dll I assume visual studio has done that for me. ...
0
by: Saumendra | last post by:
Hi guys, When I am adding a Web Reference in Visual Studio.net, I provide the url to the .vsdisco file, so that Visual Studio.net can dynamically discover all the available Web Services. Now when...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
0
by: Nikhil Patel | last post by:
Hi all, I am having a problem adding a reference in an ASP.Net project. I have written a custom control using a Web Control Library project. I compiled this project and generated a dll. Now...
2
by: Chris Wertman | last post by:
I am rustier than I thought when it comes to Visual Studio and VB.NET for the last year I have been writing only ASP.NET pages in inline code and well I kinda forget how to add a reference , well...
5
by: Michael Russell | last post by:
Hi all, Using C#, I've created a simple wrapper class for using Excel. I have Office Pro 2003 installed on my devel machine. The wrapper class works great, reading and writing to/from Excel. ...
3
by: Jonathan Wood | last post by:
I could really use some help on this. First of all, I want to create a Web control where I render the control completely from scratch based on information from a database. In the book...
2
by: Martin Eckart | last post by:
Hello, I have built a Hello World Web Service using Visual Studio 2005 and .NET 2.0 on machine A. Setting up a Web Site on machine B and adding a web reference to that WS works fine, without any...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.