I have an SP in SQL Server (2012). It returns a single row...verified using SSMS
exec dbo.cpas_DeleteProjects N'3555,3565'
It returns a valid row with record count info in the columns.
From Access(2007), I'm calling it using an adodb call:
Sub DevolveProjects(ProjectIDs As String)
''
' Looking for a comma-delimited list of project IDs in string form: "34,52,14"
'
Dim cnn As New adodb.Connection
Dim rstReturnValues As adodb.Recordset
cnn.ConnectionString = "Provider=SQLOLEDB;Server=" & CurrentServerName() & ";Initial Catalog=" & CurrentDBName() & ";Integrated Security=SSPI;"
cnn.Open
Set rstReturnValues = cnn.Execute("exec dbo.cpas_DeleteProjects N'" & ProjectIDs & "'")
With rstReturnValues...
Problem is, rstReturnValues is closed. No data.
I've verified using SQL Profiler that the sp is running the expected SQL when called from the Access app as above, and seems to be performing just fine, so there are no issues with authentication. I'm just not getting my recordset populated. When I copy and paste the exact SQL statement SQL Profiler saw into an SSMS query, it returns EXACTLY what I expect....
Have I coded the .execute call incorrectly? Ideas?