Click here to Skip to main content
14,327,007 members
Rate this:
Please Sign up or sign in to vote.
See more:
Error 1 The type or namespace name 'DataAccessComponent' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\Ben\My Documents\Visual Studio 2008\Projects\Connections\Connections\Program.cs 17 13 Connections
Posted
Updated 9-Mar-11 9:53am
v3
Comments
Toli Cuturicu 9-Mar-11 15:45pm
   
Google? MSDN?
TimGameDev 9-Mar-11 17:01pm
   
It's interesting which answers are you expecting? With this way of asking you'd better ask soothsayer from the "Matrix"
   
LOL!
--SA
Rate this:
Please Sign up or sign in to vote.

Solution 1

Which Data Access are you using. you need to add the name space at the top of your code, something like this. I don't know your code so don't take this literally.

using System.Data;


To get an exact namespace to use, show you your code or figure it out from MSDN. If it is third party tool, you need to figure out which namespace to include.
   
v3
Comments
   
Correct, my 5. Additionally, I explain how to figure out this using Visual Studio.
--SA
sairam.bhat 10-Mar-11 0:50am
   
good answer sir
Rate this:
Please Sign up or sign in to vote.

Solution 3

It's not just "using", it's 1) having some assembly referenced, 2) looking at the name space(s) used by the type declarations of the assembly you reference, 3) adding appropriate "using" clauses to your code.

With Visual Studio, you can open you project's References node in Solution Explorer, add the reference if you did not do it yet and then click on the tree node of the referenced assembly. In the document view you can browse the assembly in question and find out all the name spaces.

Also, an assembly can be loaded during run-time using methods of the class System.Reflection.Assembly.

If this is not a .NET assembly, P/Invoke should be used.

—SA
   
v2
Comments
sairam.bhat 10-Mar-11 0:50am
   
good answer sir
   
Thank you very much.
--SA
Rate this:
Please Sign up or sign in to vote.

Solution 2

If it is not a .NET componant, have you made sure the dll that contains this is in your References? You may need to add it there.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100