473,796 Members | 2,864 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.SQLServe r gSQLServerDMO = new
SQLDMO.SQLServe r();
}

//Error
d:\My Documents\Visua l Studio
Projects\BugsNe t\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 5604
If SQLDMO is the namespace this is in, it at least needs to be
SQLDMO::SQLServ er (the scope operator '::' instead of '.').

Ronald Laeremans
Visual C++ team

"Neil Guyette" <ng******@gemss ensors.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.SQLServe r gSQLServerDMO = new
SQLDMO.SQLServe r();
}

//Error
d:\My Documents\Visua l Studio
Projects\BugsNe t\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::SQLSer ver (the scope operator '::' instead of '.').
Ronald Laeremans
Visual C++ team

"Neil Guyette" <ng******@gemss ensors.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.SQLServe r gSQLServerDMO = new
SQLDMO.SQLServe r (); }

//Error
d:\My Documents\Visua l Studio
Projects\BugsNe t\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
36225
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 As Integer Dim GivenDate As Date GivenDate = "2/1/2004" Answer = GivenDate + 182
5
5043
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. "Steve Alpert" wrote: > Richard wrote: > > I have Visual C++ .net 2003 and am trying to add a chart to a form. When I > > try and use MSChart or any other of the activeX controls (ie MS Calendar) I > > get an error message saying that it can't...
0
4617
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 I do this, I get a list of all the Web Services. Next I want add reference to all these Web Service to my Visual Studio.net project, and so I hit "Add reference" button on the Add Reference dialog box. By doing this I THOUGHT all the Web...
3
4886
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 the best method? Do you have a sample of how to do this?
0
1370
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 when I try to add a reference to this dll in an ASP.Net application, Visual Studio displays a message - In order to add this reference, the directory "C:\MyControl\bin\Debug\" will be added to the project's ReferencePath property. This will change...
2
1414
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 sort of..... I am trying to add System.Net but it dosent show up when I right click and try to select it from the refrences menu, in fact very few assemblies I use show up there. I tried adding it to AssemblyInfo.vb but that dosent seem to work...
5
49832
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. To do this, I created a reference to "Microsoft Excel 11.0 Object Library", and have a "using Excel;" directive. I decided to add a method for creating a TextBox using the Shapes.AddTextBox method, which requires a
3
1883
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 "Beginning ASP.NET 2.0 in C# 2005", it provides an example of doing this, which is declared as: public class ConfigurableRepeater : WebControl.
2
2439
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 delays. Setting up the same Web Site on machine C it takes forever after I select the WS and hit the "Add Reference" button in the wizard. Every time I updated the web reference the same. In addition the executing of the application takes...
0
9679
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9527
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10453
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10172
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9050
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.