you are only deleting the records on the client side, you still need to delete them form the database:da.SelectCommand.CommandText = "Select * From DocTypeInfo";
custCB = new SqlCommandBuilder(da);  da.Update(dsDocTypeInfo.Tables[1]);
  da.Update(dsDocTypeInfo.Tables[0]);

解决方案 »

  1.   

    你不知道用数据库编程啊,又何必到程序代码里去写呢?SQL支持联级删除的啊,如果不能就定触发器吧!
      

  2.   

    俺看半天ado.net,书上说它有多先进,让俺试试总可以吧,谁说说用程序代码实现的了实现不了啊。
    saucer(思归, MS .NET MVP) 你的意思是不是再加下面一句?
    da.Update(dsDocTypeInfo.Tables[1]);
    我试了,也不行。那位大侠还知道。
      

  3.   

    好了,
    思归,就是你说的那样,刚才我把两句写反了, 
      我先update的table[0]后update的table[1],现在把顺序改一下就可以,谢谢!  da.Update(dsDocTypeInfo.Tables[1]);
      da.Update(dsDocTypeInfo.Tables[0]);