Error in Dataset Relation generated by Designer

  • Thread starter Thread starter ivanpololi
  • Start date Start date
I

ivanpololi

Hello,

this is driving me crazy...

I generated a dataset relation in the Visual Studio 2005 Designer and
called it TestRelation.

The designer generated this portion of code:

Public Function GetBRows() As BRow()
Return
CType(MyBase.GetChildRows(Me.Table.ChildRelations("TestRelation")),BRow())
End Function

When I debug it I find that Me.Table.ChildRelations("TestRelation") is
Nothing...and so I get a bunch of errors from the method GetBRows.

How come is Nothing when I can see it in the Designer?!? Anybody can
help me?

Thank you very much,
Ivan Pololi
Italy
 
Hello,

this is driving me crazy...

I generated a dataset relation in the Visual Studio 2005 Designer and
called it TestRelation.

The designer generated this portion of code:

Public Function GetBRows() As BRow()
Return
CType(MyBase.GetChildRows(Me.Table.ChildRelations("TestRelation")),BRow())
End Function

When I debug it I find that Me.Table.ChildRelations("TestRelation") is
Nothing...and so I get a bunch of errors from the method GetBRows.

How come is Nothing when I can see it in the Designer?!? Anybody can
help me?

Thank you very much,
Ivan Pololi
Italy
try to build a new dataset and check the enforceconstraints property..
DataRelationCollection drc = Me.Table.ParentRelations;

if this count 0 You haven't the right setting about your dataset
 
Back
Top