corocoto Asked:2020-11-26 20:23:01 +0000 UTC2020-11-26 20:23:01 +0000 UTC 2020-11-26 20:23:01 +0000 UTC 在c#中实现多对多关系(windows窗体) 772 有一个具有多对多关系的数据库。我在“路线数据”表格上使用它 我不知道如何编写 sql 查询以文本形式(右 cxomboBox)显示某条路线的选定点(即 tRoutesPuncts 中记录的点)。 PS 在左侧的组合框中显示所有路线 c# 1 个回答 Voted Best Answer corocoto 2020-11-26T21:15:07Z2020-11-26T21:15:07Z 我在互联网上搜索了一点,找到了我自己问题的答案。 int id=Convert.ToInt32(((DataRowView)this.bsForRoutes.Current).Row["ID_Route"]) adapter = new SqlDataAdapter("SELECT tRoutesPuncts.ID_Punct, tPuncts.sPunct FROM dbo.tRoutesPuncts INNER JOIN tRoutes ON dbo.tRoutesPuncts.ID_Route = dbo.tRoutes.ID_Route" + " inner join tPuncts ON dbo.tRoutesPuncts.ID_Punct = dbo.tPuncts.ID_Punct WHERE tRoutesPuncts.ID_Route=" + id, connection);
我在互联网上搜索了一点,找到了我自己问题的答案。