Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
1.00/5 (5 votes)
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"
Sergey Alexandrovich Kryukov 9-Mar-11 20:24pm    
LOL!
--SA

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.

C#
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.
 
Share this answer
 
v3
Comments
Sergey Alexandrovich Kryukov 9-Mar-11 20:45pm    
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
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
 
Share this answer
 
v2
Comments
sairam.bhat 10-Mar-11 0:50am    
good answer sir
Sergey Alexandrovich Kryukov 10-Mar-11 1:59am    
Thank you very much.
--SA
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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900