开发者

A TableRow referenced trought a DataRelation always returns null

Using the DataSet designer in Visual Studio 2010, I've added some tables from a MySql DB. VS10 automatically picks up and adds the relations between the tables, e.g., the relation "FK_organisatie_adres" between the tables "Organisatie" and "Adres":

A TableRow referenced trought a DataRelation always returns null

In the C# code, a property was automatically generated that "resolves" that relationship: a row of Organisatie has a property .adresRow (I assume through the detected relation "FK_organisatie_adres")

A TableRow referenced trought a DataRelation always returns null

Problem: when running the code, the "theAddress" (hence the .adresRow property) is ALWAYS null!

Also 开发者_如何学编程the "theOrganisationRow.GetChildRows("FK_organisatie_adres")" always return null. and the "organisationDT.ChildRelations" is empty.

What am I doing wrong? What do I need to do extra before I can use the automatically generate .adresRow property?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜