Link to home
Create AccountLog in
Avatar of bjqrn
bjqrn

asked on

How to import a namespace?

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?
ASKER CERTIFIED SOLUTION
Avatar of DeanHorak
DeanHorak

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of bjqrn
bjqrn

ASKER

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
Avatar of bjqrn

ASKER

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;