Dim cmd As New SQLCommand
Dim dt As DataTable
cmd.C
cmd.CommandText = "SELECT * From {员工}"
dt = cmd.ExecuteReader()
For Each dr As DataRow In dt.DataRows
If DataTables("员工").Find("身份证号码 = '" & dr("身份证号码") & "' And 另一列 = '" & dr("另一列") & "'") Is Nothing Then
Dim nr As DataRow = DataTables("员工").AddNew()
For Each dc As DataCol In dt.DataCols
nr(dc.name) = dr(dc.name)
Next
End If
Next
建议看看:
http://www.foxtable.com/help/topics/1284.htm
[此贴子已经被作者于2012-10-10 11:28:21编辑过]