|
public DataSet aaa(DataTable dt)
{
string sql ="select a.*,b.* from tba left join "+dt+" b on a.id=b.id";
}
Change it
public DataSet aaa(DataTable dt)
{
step 1:
Read tba data and write to dataTableA
step 2:
Build a dataset and merge dt and dataTableA into the dataset
step 3:
Establish a relationship. From your SQL, dataTableA is the parent table and dt is the slave table
In this way, you can access whatever data you want
} |
|