مشکل من اینه که وقتی تو یه دستور sql ام از group by استفاده می کنم رکورد ست خالی می فرسته
این ماجولم
Public Function fetch(strsql As String) As ADODB.Recordset
Set CN = New ADODB.Connection
Set CM = New ADODB.Command
Set RS = New ADODB.Recordset
CN.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=cooperation;Data Source=."
CN.Open
Set RS.ActiveConnection = CN
RS.Source = strsql
RS.CursorLocation = adUseServer
RS.CursorType = adOpenKeyset
RS.LockType = adLockOptimistic
RS.Open
Set fetch = RS
End Function
و این بازیابی من
Dim RSdestination As ADODB.Recordset
Set RSdestination = fetch("select destination from service group by destination ")
'MsgBox RSdestination.RecordCount
که رکوردست خالی می فرسته