Thanks, it works
Dim cda As ADODB.Command
Dim rs As ADODB.Recordset
Dim intcount As Integer
Dim strTemp As String
Set rs = New ADODB.Recordset
Set cda = New ADODB.Command
cda.ActiveConnection = cn_wO
cda.CommandTimeout = 400
cda.CommandType = adCmdStoredProc
cda.CommandText = "dbo.sp_Test"
cda.Parameters.Append cda.CreateParameter("@Par1", adChar, adParamInput,
20, "Test")
cda.Parameters.Append cda.CreateParameter("@Par2", adInteger,
adParamInput, 50, "1")
Set rs = cda.Execute
intcount = 1
Do Until rs Is Nothing
Debug.Print "Contents of recordset #" & intcount
Debug.Print
"------------------------------------------------------------------------------"
If rs.State <> 0 Then
Do Until rs.EOF
strTemp = ""
For i = 0 To rs.Fields.Count - 1
strTemp = strTemp & Trim(rs.Fields(i)) & "|"
Next i
Debug.Print strTemp
rs.MoveNext
Loop
End If
Set rs = rs.NextRecordset
intcount = intcount + 1
Loop
>> Hello,
>>
[quoted text clipped - 36 lines]
>
> That should give you what you're looking for.