No 'New' accessable with Data Set

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a dataset in a class library and when I try to create a new table in
another project that has a reference to that dataset I'm getting the error
"Overload resolution failed because no 'New' is accessible." There are a
bunch of different tables in this dataset and there are only two that I'm
having this problem with. I can instantiate all other tables just fine. I
have tried completely deleting this dataset and re-creating it and these
tables still have the same problem. If I go into the code behind the dataset
I can see that the constructor and some other properties are marked as
"friend" and I can manually change them to "public" and it fixes the problem
but this means that if I ever re-generate those particular tables I have to
manuall fix it again. Is there any way to fix this?
 
I do create the whole dataset, when I do it makes those two tables'
constructors inaccessable from other projects.

Miha Markic said:
Hi,

Why don't you create the whole dataset?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

SubstandardSnowman said:
I have a dataset in a class library and when I try to create a new table in
another project that has a reference to that dataset I'm getting the error
"Overload resolution failed because no 'New' is accessible." There are a
bunch of different tables in this dataset and there are only two that I'm
having this problem with. I can instantiate all other tables just fine. I
have tried completely deleting this dataset and re-creating it and these
tables still have the same problem. If I go into the code behind the
dataset
I can see that the constructor and some other properties are marked as
"friend" and I can manually change them to "public" and it fixes the
problem
but this means that if I ever re-generate those particular tables I have
to
manuall fix it again. Is there any way to fix this?
 
I did mean an instance of dataset..

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

SubstandardSnowman said:
I do create the whole dataset, when I do it makes those two tables'
constructors inaccessable from other projects.

Miha Markic said:
Hi,

Why don't you create the whole dataset?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

in
message news:[email protected]...
I have a dataset in a class library and when I try to create a new table
in
another project that has a reference to that dataset I'm getting the
error
"Overload resolution failed because no 'New' is accessible." There are
a
bunch of different tables in this dataset and there are only two that
I'm
having this problem with. I can instantiate all other tables just fine.
I
have tried completely deleting this dataset and re-creating it and
these
tables still have the same problem. If I go into the code behind the
dataset
I can see that the constructor and some other properties are marked as
"friend" and I can manually change them to "public" and it fixes the
problem
but this means that if I ever re-generate those particular tables I
have
to
manuall fix it again. Is there any way to fix this?
 
That does work but why do I have to do this. Why does it create the
constructors for those tables as friend only? There has to be a fix for this.

Miha Markic said:
I did mean an instance of dataset..

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

SubstandardSnowman said:
I do create the whole dataset, when I do it makes those two tables'
constructors inaccessable from other projects.

Miha Markic said:
Hi,

Why don't you create the whole dataset?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

in
message I have a dataset in a class library and when I try to create a new table
in
another project that has a reference to that dataset I'm getting the
error
"Overload resolution failed because no 'New' is accessible." There are
a
bunch of different tables in this dataset and there are only two that
I'm
having this problem with. I can instantiate all other tables just fine.
I
have tried completely deleting this dataset and re-creating it and
these
tables still have the same problem. If I go into the code behind the
dataset
I can see that the constructor and some other properties are marked as
"friend" and I can manually change them to "public" and it fixes the
problem
but this means that if I ever re-generate those particular tables I
have
to
manuall fix it again. Is there any way to fix this?
 
SubstandardSnowman said:
That does work but why do I have to do this. Why does it create the
constructors for those tables as friend only? There has to be a fix for
this.

Strong typed dataset is strong typed *dataset*.
It isn't meant to extrace individual tables out from it.
You might copy the code though..
 
Back
Top