Just in case it ever returns a recordset



  • pRecSet->Open(command...)
    while ((pRecSet != NULL))
    {
        if (pRecSet->State != adStateClosed)
        {
            // Log error. If stored procedure has been changed, 
            // and no one updated this code.
            WriteToLog(... "Unexpected open recordset returned from %s"...)
        }
        pRecSet = pRecSet->NextRecordset(NULL);
    
    }
    

    ???

    Because returning a recordset is the only change that we can't expect?



  • BTW, that condition will only happen if the proc does a data-returning statement. If it does a non-returning statement, like an INSERT, UPDATE, or DELETE, it won't log.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.