An application obtains the handle of any explicitly allocated descriptor as an output argument of the call to SQLAllocHandle. The handle of an implicitly allocated descriptor is obtained by calling SQLGetStmtAttr.