udpate外键 [英] udpate foreign key
问题描述
您好,
如果该字段是与另一个表相关的fk ID,如何使用L2E更新表中的字段。看来我不能简单地插入一个我知道与该外表中的值相关的整数值。防爆。 - 我有一张员工表和一份职称表。 employee表的jobID是一个与作业标题表中的jobID字段相关的整数。当我在Employee表中插入新记录时,我无法简单地设置Employee.jobID = 1的值。
how do I update a field in a table using L2E if that field is a fk ID that relates to another table. It seems I cannot simply insert an integer value that I know relates to a value in that foreign table. Ex. - I have an employee table and a job title table. the employee table has a jobID that is an integer that relates to the jobID field in the job title table. When I insert a new record into the Employee table, I am not able to simply set the value of Employee.jobID = 1.
谢谢任何想法。
推荐答案
嗨卡尔,
我刚刚解决了我的问题:),你可以查看:
I just solved mine :), You can check this:
这篇关于udpate外键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!