Learn how to a build a cloud-first strategyRegister Now


How to import a namespace?

Posted on 2006-03-27
Medium Priority
Last Modified: 2013-11-19
I need to import the MySql.Data.MySqlClient namespace in vc.net 2003. I've installed Connector/Net 1.0.

How do I do this?
Question by:bjqrn
  • 2
LVL 11

Accepted Solution

DeanHorak earned 1500 total points
ID: 16303598
Just add

using namespace MySql::Data::MySqlClient;

to the top of you C++ code..

Author Comment

ID: 16308889
This is what I get:

i:\projects\rpg\rpgserver\rpgserver.cpp(6) : error C2653: 'MySql' : is not a class or namespace name
i:\projects\rpg\rpgserver\rpgserver.cpp(6) : error C2871: 'MySqlClient' : a namespace with this name does not exist

Author Comment

ID: 16309172
Found it out, had to place the MySQL.Data.DLL in my Debug/Release directory then put managed extensions option on, then write this code:

#using "MySql.Data.dll"
using namespace MySql::Data::MySqlClient;

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

810 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