Last post Jun 14, 2011 09:52 AM by tigershrimp
May 25, 2009 08:18 PM|dharric|LINK
I know most of you are thinking missing reference to system.data dll or something along those lines, but nope. I have the reference and am successfully using the namespace in some pages. However some of my class files are not able give that using statement
as System.Data does not appear on the list of available references.
May 25, 2009 11:37 PM|vinz|LINK
AFAIK, the namespace System.Data will be automatically added once you created the class.. Have you tried declaring it and rebuild your application?
May 26, 2009 12:08 AM|mo meng|LINK
is the class file reside in the same project as your page file? is the system.data dll inside that project?
there is a possibility where the vs is corrupted. close your application and re-open it to try
May 29, 2009 12:00 AM|Wencui Qian - MSFT|LINK
That seems strange. But if you've added the namespace, can you use it correctly?
Jul 26, 2010 04:25 PM|itissdr|LINK
I know this is over a year old but some people still need a solution. I found this thread researching an identical problem but I ended up figuring it out on my own.
The problem is the BuildAction property of your class. When the build action is set to 'content' some namespaces are disabled like System.Data and System.Linq.
1. Choose the effected class file in the solution explorer.
2. Set the Build Action property to Compile.
3. Go back to the using section of the class and System.Data will be available.
Jun 14, 2011 09:52 AM|tigershrimp|LINK
I have created a blog with step by step instructions including screenshots about this issue at
hope this helps!