Error with: using System.Data;

Thematiq picture Thematiq · May 24, 2014 · Viewed 24.7k times · Source
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

Answer

Nirav Kamani picture Nirav Kamani · May 24, 2014

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.