Error with: using System.Data;

28.8k Views Asked by At
using System;
using System.Data;
using System.Data.SqlClient;
...

I get the following error:

The type or namespace name 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?)

I'm using Visual Studio 2013 Express for Windows Desktop

3

There are 3 best solutions below

0
Nirav Kamani On BEST ANSWER

You are missing assembly reference. You need to add assembly reference.

Check out following images.

Go to soution explorer right click on references and select Add Reference.

then Select System.Data assemly reference.enter image description here

That's it.

Press ok.

Press F6 to rebuild your project.

0
Jevgeni Geurtsen On

In the Solution Explorer window of Visual Studio right click on your project, and click Add Reference. There you can add assembly reference which are sometimes needed to use certain namespaces (like System.Data).

0
Youssef Shaaban On

view > Object browser then select System.Data then add references in selected project IMAGE1