Groups | Blog | Home
all groups > dotnet ado.net > october 2007 >

dotnet ado.net : Error in Dataset Relation generated by Designer



ivanpololi NO[at]SPAM yahoo.it
10/10/2007 12:00:00 AM
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
bikelink
11/15/2007 11:30:01 AM


[quoted text, click to view]
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


AddThis Social Bookmark Button