DataSet dsUntyped = (DataSet)Session["ds"];
   System.Data.UniqueConstraint uc = new UniqueConstraint("unqi",dsUntyped.Tables["Master"].Columns["MasterID"]);
   dsUntyped.Tables["Master"].Constraints.Add(uc);
   Session["ds"] = dsUntyped;


DataSet dsUntyped = (DataSet)Session["ds"];
   System.Data.ForeignKeyConstraint fc = new ForeignKeyConstraint("fc",dsUntyped.Tables["Master"].Columns["MasterID"],dsUntyped.Tables["Child"].Columns["MasterLink"]);
   dsUntyped.Tables["Child"].Constraints.Add(fc);
   Session["ds"] = dsUntyped;

相关文章:

  • 2022-12-23
  • 2021-12-05
  • 2021-10-06
  • 2022-12-23
  • 2022-01-27
  • 2021-12-27
  • 2022-12-23
  • 2021-06-08
猜你喜欢
  • 2022-01-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-07
  • 2022-12-23
  • 2021-08-06
相关资源
相似解决方案