Datagrid显示来自两个表的数据 [英] Datagrid displaying data from two tables
问题描述
你好-
我正在使用Sql Server 2005和VB .Net 2013; ASP .NET
I am using Sql Server 2005 and VB .Net 2013; ASP .NET
我有两个表,总之,我将只列出几列.
I have two tables and for short, I will list only a couple of columns.
TableA
PersonID,PersonName
PersonID, PersonName
TableB
PersonID,DateStarted,DateFinished,Completed
PersonID, DateStarted, DateFinished, Completed
这种关系是一对多的;表A到表B
The relationship is one to many; TableA to TableB
我需要显示一个具有PersonName,Maximum DateStarted,DateStarted和DateFinished之间的天数以及Completed列下的条目数为"Done"的数据网格.
I need to display a Datagrid with PersonName, Maximum DateStarted, how many days between DateStarted and DateFinished and how many entries under Completed column say "Done."
此外,第一列已经填充了PersonName.
Also, the first column is already populated with PersonName.
为VB .Net编写代码的最佳方法是什么? 有人可以为此指向我一个好的网站吗?
What is the best way to code VB .Net to do this? Can someone point me to a good website for this?
任何帮助将不胜感激!
少年薄荷糖
推荐答案
可能在 ASP.Net论坛中提问论坛,但我不知道哪个论坛.
Probably ask in ASP.Net Forums Forum but which Forum I don't know.
这篇关于Datagrid显示来自两个表的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!