I have created a DataSet out of an SQL Server DB. In the server, there are
several 1:1 relations, in the graphical representation of the DataSet in
Visual Studio, it seems as if there were just 1:n relations. Why? Is it a bug
in VS 2005 or is it impossible for an autogenerated DataSet to understand
those relations?

Re: 1:1 Relation by Cor

Cor
Wed Aug 23 12:41:27 CDT 2006

Florian,

What is the problem as there is in Net forever forever a parent with a
collection of childs if it is zero ore more.

There cannot be a child without a parent.

Cor

"Florian Lehner" <FlorianLehner@discussions.microsoft.com> schreef in
bericht news:42E5D12E-920D-465A-9918-A35E0130C59B@microsoft.com...
>I have created a DataSet out of an SQL Server DB. In the server, there are
> several 1:1 relations, in the graphical representation of the DataSet in
> Visual Studio, it seems as if there were just 1:n relations. Why? Is it a
> bug
> in VS 2005 or is it impossible for an autogenerated DataSet to understand
> those relations?



Re: 1:1 Relation by Frans

Frans
Thu Aug 24 03:05:39 CDT 2006

Florian Lehner wrote:

> I have created a DataSet out of an SQL Server DB. In the server,
> there are several 1:1 relations, in the graphical representation of
> the DataSet in Visual Studio, it seems as if there were just 1:n
> relations. Why? Is it a bug in VS 2005 or is it impossible for an
> autogenerated DataSet to understand those relations?

I'd say it's a bug unless you didn't define / there isn't defined a
PK on the FK side of the 1:1 relation OR no UC column(s). A 1:1
relation can only be placed between two PK's or between a PK and a UC.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------

Re: 1:1 Relation by FlorianLehner

FlorianLehner
Thu Aug 24 04:24:02 CDT 2006



"Frans Bouma [C# MVP]" wrote:
>
> I'd say it's a bug unless you didn't define / there isn't defined a
> PK on the FK side of the 1:1 relation OR no UC column(s). A 1:1
> relation can only be placed between two PK's or between a PK and a UC.
>
> FB

Hi,

well both tables are using the same primary key, the PK is defined in both
tables and in SQL Server I defined the relation between these two keys.
If I look at the tables in SQL Server (Diagramm View) the relation graphs
are drawn with a "key" token on each side of the line, in Visual Studio they
have the key token on one side and the infinity token on the other. That's
why I was wondering.
Btw, what does the abbrevation "UC" stand for?

Greetings,

Flo


Re: 1:1 Relation by Frans

Frans
Fri Aug 25 04:01:25 CDT 2006

Florian Lehner wrote:

>
>
> "Frans Bouma [C# MVP]" wrote:
> >
> > I'd say it's a bug unless you didn't define / there isn't defined
> > a PK on the FK side of the 1:1 relation OR no UC column(s). A 1:1
> > relation can only be placed between two PK's or between a PK and a
> > UC.
> well both tables are using the same primary key, the PK is defined in
> both tables and in SQL Server I defined the relation between these
> two keys. If I look at the tables in SQL Server (Diagramm View) the
> relation graphs are drawn with a "key" token on each side of the
> line, in Visual Studio they have the key token on one side and the
> infinity token on the other. That's why I was wondering.

then it's indeed strange. Please post this either in the Connect
buglog or post this on the forums.microsoft.com forum for ADO.NET so a
microsoftie will look at it.

> Btw, what does the abbrevation "UC" stand for?

Unique Constraint ;)

FB


--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------