Just guessing here...
You used OCICollSize(m_pConnection->m_hEnv, m_pConnection->m_hError, ...) but OCICollGetElemArray(hEnv, hError, ...). Could it be that hEnv and/or hError areuninitialized variables, unlike m_pConnection->m_hEnv and m_pConnection->m_hError?
I know one often reformats actual code when posting it, so maybe that's nothing, but just in case.
In general avoid C-casts (which are even stronger than reinterpret_cast<>), and don't cast unless you really need it (I see unnecessary ones), to ensure you are really using the correct types. Otherwise it's just too easy to crash with OCI IMHO. --DD
Well, some minutes before I have the same problem, but I realised, I missed the types.
Your code seems correct, but we cannot see the type of variable exists. It seems to boolean, but it should be boolean*, and point to an allocated nCount sized buffer.