Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我在 DataGridView 中修改和删除数据时,出现错误:
The record cannot be deleted or changed because table 'Table Name' includes related records.
但我可以添加新数据,但不能修改和删除数据。
您需要先删除“子”记录。如果您不这样做,这些记录将被“孤立”,这正是警告您的错误消息。最简单的方法是在数据库中的表之间的关系上设置级联删除属性。