First of all I got mine fixed. It is returning recordsets, and return values now. So that being said I think it may be in your code somewhere. Can you post both your VB code and the Sproc that your using? I will run through them and see how they differ from mine. Right off I know I used the Execute Method of the Command object rather then the Open method of the Recordset, but I'm not to sure if that would cause it to not work. Below is the code i just did which worked...
---Beginning of VB Code---
Public Function EmployeeSelectByID(ByRef rs As ADODB.Recordset, intID As Integer) As Long
On Error GoTo Err_EmployeeSelectByID
'Use the global ADO command object.
Set g_objCmd = New ADODB.Command
'Setup the command object.
Set g_objCmd.ActiveConnection = g_objConn
g_objCmd.CommandText = "procEmployeeSelectByID"
g_objCmd.CommandType = adCmdStoredProc
g_objConn.CursorLocation = adUseClient
'Append the parameters into the command object.
g_objCmd.Parameters.Append g_objCmd.CreateParameter("Return", adInteger, _
adParamReturnValue, 0)
g_objCmd.Parameters.Append g_objCmd.CreateParameter("EmployeeID", adInteger, _
adParamInput, , intID)
'Now execute our command and return recordset result.
Set rs = g_objCmd.Execute
'Set our return value.
EmployeeSelectByID = g_objCmd.Parameters("Return"
Exit_EmployeeSelectByID:
Exit Function
Err_EmployeeSelectByID:
LogError "modRead.EmployeeSelectByID()"
End Function
---End Code---
---Begin Stored Procedure---
CREATE PROCEDURE procEmployeeSelectByID
@EmployeeID integer
AS
--Declare the output variable
DECLARE @Return int
--Get all the records
SELECT * FROM tblEmployee
WHERE EmployeeID = @EmployeeID
--Get the RecordCount so we can return it to the application
SET @Return = @@rowcount
--Look for errors
IF @@error > 0
SELECT @Return = -1
RETURN @Return
GO
---End Sproc---