1
Answer

'Data' : is not a member of 'System'

Ask a question
ray dona

ray dona

15y
5.9k
1

I am building a class (static) library using C++ to access a database in Visual.Net. I have declared:

using namespace System;

using namespace System::Data;

below #pragma once.

I get the compiler errors:

error C2039: 'Data' : is not a member of 'System'

error C2871: 'Data' : a namespace with this name does not exist

This is despite adding a reference to System.Xml (DataSet class defined in this) in the Add Reference dialog box. How can I overcome these errors? I would be grateful for any suggestions.

 


Answers (1)