最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

How to: Create a Relation

网络文摘 William 1867浏览 0评论
Use this step procedure to create a relation between the AJ_SubGenreTable and the AJ_BookTypeTable. The Sub-genre is related to the BookType table.

For example, the Sub-Genre ‘Poems’ can be only related to the record “Poetry” in the AJ_BookTypeTable table. You should not be able to have a “Novels” as Sub-genre for “Poetry”.
To understand the example scenario – Gohere
To understand more details about types of relations: Gohere.
1. In the AOT, locate the AJ_EDTBookTypeID EDT.
2. Right-click the AJ_EDTBookTypeID EDT and select Properties.
3. In the ReferenceTable property enter AJ_BookTypeTable.
4. Close the properties sheet.
5. Expand the AJ_EDTBookTypeID node.
6. Right-click the Table References node and select New > Table Reference. A new table reference is created.
7. Right-click the AJ_BookTypeTable Table Reference and select properties.
8. In the related field property, enter AJ_BookTypeID
9. Close the property sheet and save your changes to the EDT.
10. If the database synchronization dialog appears, click Yes.
11. Drag the AJ_EDTBookTypeID EDT to the field node on the AJ_SubGenreTable
12. When prompted to add the ForeignKey relation from the EDT, click Yes. This will automatically create the relation between the AJ_SubGenreTable and the AJ_BookTypeTable.
13. Rename the AJ_EDTBookTypeID field to AJ_BookTypeID.


 
 
 
 
 
 
 
 
 
 
 
Note: Relations can also be added manually by right-clicking the relations node on the table.
However when you create the reference on the EDT and set it as a primary key, once the EDT is added to a table, the system will prompt to add the reference automatically.

转载请注明:ww12345678 的部落格 | AX Helper » How to: Create a Relation

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址