我有这些表:
TABLE_DIRECTOR
-directorID
-name
-adres
-birthDate
-yearsExperience
TABLE_FILM
-filmID
-directorID
-filmstudioID
-title
-budget
-filmstudioName
-directorName
TABLE_FILMSTUDIO
-filmstudioID
-name
-website
-foundingDate
-numberOfBuildings
我要做的是detailsview
用所有filmdirectors
. 我也有一个gridview
里面装满了所有工作过filmstudio
的directors
东西。
为了填补这一点gridview
,我将以下代码放入我的TABLE_FLMSTUDIO_TABLEADAPTER
:
SELECT TABLE_FILMSTUDIO.filmstudioID, TABLE_FILMSTUDIO.name,
TABLE_FILMSTUDIO.website, TABLE_FILMSTUDIO.foundingDate,
TABLE_FILMSTUDIO.numberOfBuildings
FROM TABLE_FILMSTUDIO INNER JOIN
TABLE_FILM ON TABLE_FILMSTUDIO.filmstudioID = TABLE_FILM.filmstudioID
WHERE (TABLE_FILM.directorID = @directorID)
但是,当我运行页面时,这给了我以下错误
Failed to enable constraints. One or more rows contain values
violating non-null, unique, or foreign-key constraints.
有人有想法吗?