关系在父表和子表中的匹配的列之间创建,两个列的 DataType 值必须相同

解决方案 »

  1.   

    >>>DataRelation的父列和子列对应的字段名不一样可以吗?可以, make sure the type is same and the column is in the right tableDataColumn sp=this.dataSet1.Tables["SS_PRODUCT"].Columns["p_id_parent"];
    DataColumn spType=this.dataSet1.Tables["SS_PRODUCT_TYPE"].Columns["pt_id"];Response.Write(sp.DataType.Name);
    Response.Write(spType.DataType.Name);2. does SS_PRODUCT contain values of p_id_parent not in SS_PRODUCT_TYPE's 
    pt_id?
      

  2.   

    数据类型确实不一样,奇怪
    在oracle中,Data Type均为float ,为什么读出来有的变成decimal,有的变成double类型
    这里pt_id为主健,decimal类型
    p_id_parent为double类型