I have a weird error.. I'm using a stored procedure to return a resultset through an ODBC connection.Here is a procedure definition:CREATE PROCEDURE spGetStudents @permission smallintASBEGIN IF @permission = 1 SELECT id, name FROM vStudentList ELSE SELECT name FROM vStudentListENDgo
When I try to loop through the resultset, I get an "ODBC error fetch type out of range" during the final MoveNext before EOF. I do a check for EOF before the MoveNext and it is false. What is weird is that if I remove the logic in the stored procedure like so:CREATE PROCEDURE spGetStudents @permission smallintASBEGIN SELECT id, name FROM vStudentListENDgo
and run the same code then it executes perfectly. I would assume that both procedures would return the same resultsets because I call both of them with:EXEC spGetStudents 1
Does anybody have any idea what is happening with this?