怎样去掉查询的重复记录
下面代码之中怎样去掉查询的重复记录
Adodc1.RecordSource = "select * from 数据表 "
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 0 Then Exit Sub
For i = 0 To Adodc1.Recordset.RecordCount - 1
Combo1.AddItem Adodc1.Recordset.Fields(0).Value
Adodc1.Recordset.MoveNext
Next
On Error Resume Next
[解决办法]
Adodc1.RecordSource = "select distinct 字段名 from 数据表 "