I have the following SP
CREATE PROCEDURE IALEIAMbrInfoSource
(
@WhereClause NVARCHAR(4000) = ''
)
AS
SET NOCOUNT ON
DECLARE @SQLstr NVARCHAR(4000)
SET @SQLstr = 'SELECT * FROM IALEIAMbrInfo' + @WhereClause + ' ORDER BY UniqID'
EXEC sp_executesql @SQLStr
GO
which I am calling from Access using
spstr = "IALEIAMbrInfoSource('" & strCriteria & "')"
Set rst = cnn.Execute(spstr)
In addition to the records, I also need a count of the records, but the rst.RecordCount of Access will only give me the number of records in the recordset if it has the proper cursor type. The SP is, apparently, not or the right cursor type.
Is there any way to set the SP up so it returns the records in a particular cursor type or any other way I can get a count along with the recordset?
CREATE PROCEDURE IALEIAMbrInfoSource
(
@WhereClause NVARCHAR(4000) = ''
)
AS
SET NOCOUNT ON
DECLARE @SQLstr NVARCHAR(4000)
SET @SQLstr = 'SELECT * FROM IALEIAMbrInfo' + @WhereClause + ' ORDER BY UniqID'
EXEC sp_executesql @SQLStr
GO
which I am calling from Access using
spstr = "IALEIAMbrInfoSource('" & strCriteria & "')"
Set rst = cnn.Execute(spstr)
In addition to the records, I also need a count of the records, but the rst.RecordCount of Access will only give me the number of records in the recordset if it has the proper cursor type. The SP is, apparently, not or the right cursor type.
Is there any way to set the SP up so it returns the records in a particular cursor type or any other way I can get a count along with the recordset?