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.
我有 Access 数据库,我正在使用 VB.NET。DB有两张表
我有我想要从数据网格中的技术人员表中获得的列,但我想要有额外的列,它应该显示每个技术人员根据故障表修复了多少故障(所以我认为查询需要为每一行运行)。这甚至可能吗?
非常感谢您的帮助
那应该是
SELECT technicians.techname, count(*) AS NoOfFaults FROM technicians LEFT JOIN faults ON technicians.ID = faults.TechnicianID GROUP BY technicians.techname;
您需要在表单的 Load() 方法中指定要添加的列,并为 gridview 启用自动生成列属性为 true。