Error in Dataset Relation generated by Designer

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top