I am trying to fill a recordset from a stored procedure.
The problem I have is that I want to include an IF...ELSE
statement in my stored procedure.
When I have an IF...ELSE clause and two or more SELECT statements in my stored procedure I cannot retrieve the data from the database into a recordset.
The error message I get is "The rowset is not bookmarkable"
The recordset fills correctly when my SP only contains a single SELECT statement.
When I try to use the stored procedure with the IF..ELSE statement I can tell that the recordset has loaded by looking at the 'FIELDS' property of the recordset object but the recordcount is '-1' as if no records where returned.
I'd appreciate any advice to fix this as I have had the same problem a couple of times.
The problem I have is that I want to include an IF...ELSE
statement in my stored procedure.
When I have an IF...ELSE clause and two or more SELECT statements in my stored procedure I cannot retrieve the data from the database into a recordset.
The error message I get is "The rowset is not bookmarkable"
The recordset fills correctly when my SP only contains a single SELECT statement.
When I try to use the stored procedure with the IF..ELSE statement I can tell that the recordset has loaded by looking at the 'FIELDS' property of the recordset object but the recordcount is '-1' as if no records where returned.
I'd appreciate any advice to fix this as I have had the same problem a couple of times.