Public Function RetSQLValueC(strQuery As String) As Collection
Dim rsTmp As New ADODB.Recordset
Dim cc As New Collection
Dim N As Integer
On Error GoTo er_lab

Set rsTmp.ActiveConnection = cnnGDB
With rsTmp
.Source = ""
.MaxRecords = 1
.LockType = adLockOptimistic
.CursorLocation = adUseClient
.CursorType = adOpenKeyset
.Open strQuery, Options:=adCmdText
If .RecordCount <> 0 Then
.MoveFirst
For N = 0 To (.Fields.Count - 1)
cc.Add Item:=.Fields(N).Value, Key:=.Fields(N).Name
Next N
End If
End With
Set rsTmp = Nothing
Set RetSQLValueC = cc
GoTo ok_lab
er_lab:
cc.Add "#ERROR#"
Set RetSQLValueC = cc
ok_lab:
End Function

Используются технологии uCoz