且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从数据库中的不同表获取数据到同一行中的gridview

更新时间:2023-10-08 11:01:04

如果你对SQL有所了解,只需创建一个这样的视图:



创建[NameOfView]视图为

SELECT table1。*,table2。*

FROM table1 JOIN table2 ON table1.SomeColumn = table2.SomeMatchingColumn



then使用NameOfView创建表适配器
If you know something about SQL, just create a View like this :

Create [NameOfView] View as
SELECT table1.*,table2.*
FROM table1 JOIN table2 ON table1.SomeColumn = table2.SomeMatchingColumn

then create your table adapter with NameOfView