Leon,
cheers for this but there's a good reason for using return values & output parameters (for a discussion I had with angelIII about output params a while back, see here - also contains a link to a good resource on the subject: http://www.experts-exchang
Either way, the sproc uses a return value (I use the same db for an ASP.NET app) so I couldn't change it if I wanted to.
Suffice to say, I know I'm meant to close the recordset down before I can access the return value but I've tried looping through all records, closing and finally killing the recordset; nothing makes the return value come to life if the sproc returns records. Luckily, if the security check fails the sproc returns before it has a chance to get to the SELECT bit so at least I can detect this.
Cheers anyway,
s46.
Main Topics
Browse All Topics





by: leonstrykerPosted on 2006-02-10 at 10:11:53ID: 15925003
I usually do not use out paramenters. it is fairly easy just to return the values with a SELECT statement:
rst.Open "EXEC myProcedure", cnn, adOpenStatic, adLockOptimistic
mlngReturnValue = rst(0) & ""
Leon