日期:2014-05-17 浏览次数:20489 次
For ii = 1 To 2
Try
conn = New SqlConnection("Data Source=10.7.1.159;Initial Catalog=a1;Persist Security Info=True;User ID=wang;Password=pcdmis")
da = New SqlDataAdapter("select 分数1,分数2,分数3 from t" & ii, conn)
ds = New DataSet()
da.Fill(ds, "ds")
abc.DataGridView1.DataSource = ds.Tables("ds")
Catch ex As Exception
MsgBox("不对")
End Try
Next
select 分数1,分数2,分数3 from t1
union all
select 分数1,分数2,分数3 from t2