Stored Procedures Don't Return the Expected RecordsetMy SELECT * FROM TableName statement at the end of a stored procedure that includes INSERT [INTO], UPDATE, or DELETE statements doesn't return any rows. You forgot to add SET NOCOUNT ON as the first statement of your procedure. T-SQL and VBA can handle combinations of multiple return values and Recordsets from a stored procedure, but ADP can't. If you don't add SET NOCOUNT ON, the server returns the number of records affected for each operation, which generates an unneeded data transfer from the server to the client. In the case of the spCategoriesCT procedure, the server returns 10 values before sending the Recordset. Unless you're using VBA code to execute the query and need the RecordsAffected values returned after execution, always make SET NOCOUNT ON the first statement of your stored procedures. |