Thematiq
Thematiq

Reputation: 59

Error with: using System.Data;

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

Upvotes: 4

Views: 29189

Answers (3)

Youssef Shaaban
Youssef Shaaban

Reputation: 3

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

Upvotes: 0

Nirav Kamani
Nirav Kamani

Reputation: 3272

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.

Upvotes: 11

Jevgeni Geurtsen
Jevgeni Geurtsen

Reputation: 3133

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).

Upvotes: 0

Related Questions