ADO.Net DataTable 中的Select方法内的过滤条件可否来源于多个表,?
如题目 问题点数:20、回复次数:3Top
1 楼time_is_life(今夜太冷:http://timeislife.blog.sohu.com)回复于 2006-01-10 14:39:58 得分 10
当然不可以了,只能获得当前DataTable中的数据
private void GetRowsByFilter(){
DataTable myTable;
myTable = DataSet1.Tables["Orders"];
// Presuming the DataTable has a column named Date.
string strExpr;
string strSort;
strExpr = "Date > '1/1/00'";
// Sort descending by column named CompanyName.
strSort = "CompanyName DESC";
DataRow[] foundRows;
// Use the Select method to find all rows matching the filter.
foundRows = myTable.Select(strExpr, strSort);
// Print column 0 of each returned row.
for(int i = 0; i < foundRows.Length; i ++){
Console.WriteLine(foundRows[i][0]);
}
}
Top
2 楼lidong6(立冬)回复于 2006-01-10 14:45:39 得分 5
不可以的.Top
3 楼hyj_828(水梦)回复于 2006-01-10 14:58:32 得分 5
沒明白你的意思.Top




