Question

I am trying to add tables from an existing Advantage Database (recently upgraded from v8 to v10) to a .NET project via the Entity Framework. However, no matter what I do, the relationships between the tables are not being imported from the database. Obviously, I can just recreate them in Visual Studio, but I'd prefer to keep the data structure primarily in the database.

This link describes the problem, but the solution (permissions issues) doesn't work for me. We're using the IGNORERIGHTS security mode in connections, and user permissions are not enabled on the database.

Based on this chapter, I've made sure that the tables in question are ADT tables, and have Primary keys which are non-nullable. I've also verified that the RI constraints exist and show up in Advantage's visual designer.

Despite all that, when I "Update Model from Database" in the EDMX and select the tables which have a reference between them, no reference is created.

Is there anything else I can try? Some step I'm missing? A setting that needs to change?

Was it helpful?

Solution

I ended up deleting the EDMX for entirely unrelated reasons, and when I recreated it, relationships worked just fine. It's quite possible that Mark's suggestion was the answer, but for new ones only. I didn't do any extensive testing to try and confirm that, though.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top