父列和子列没有类型匹配的列. [英] Parent Columns and Child Columns don't have type-matching columns.
本文介绍了父列和子列没有类型匹配的列.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
建立关系时,出现此类错误
"Parent Columns and Child Columns don''t have type-matching columns."
我的表ID是int,主键和子表ID是varchar.
请帮助我其紧急
when I establised a relation i got this type of error
"Parent Columns and Child Columns don''t have type-matching columns."
My table id is int and primary key and child table id is varchar.
please help me its urgent
推荐答案
,您应该在同一ID的两个表之间进行引用.因此childTable应该有一个引用父表的int字段.
you should make a reference between both tables on the same ID. So the childTable should have an int field that references to the parent table.
两个数据类型都应该相同.还将子表ID也更改为int
或将主表ID更改为varchar
.
Both datatype should be same. Change child table id also toint
or change main table id tovarchar
.
更改列的数据类型
http://forums.asp.net/t/1585837.aspx/1 [ ^ ]
Change datatype of column
http://forums.asp.net/t/1585837.aspx/1[^]
这篇关于父列和子列没有类型匹配的列.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文