Unable to connect to Oracle 11g via OLE DB-Collection of common programming errors

SOLVED: My VC++ application was in 32 bit and my Oracle DB was in 64 bit. I initially though that the client would work with both versions of Oracle, however, it doesn’t. I thus solved the problem by reinstalling Oracle 11g2 32bit.

I’m trying to connect to a test Oracle 11g2 database via Visual Studio 2008 in C++. My database instance name is ORCL.TEST.DB, and the for testing purposes, I try to connect with user:SYSTEM and password:admin. I’m also using the Oracle OLE DB connector.

As you can see, I’m not trying anything fancy, I’m merely trying to successfully connect.

CDataSource ds;
CSession session;

int _tmain(int argc, _TCHAR* argv[])
{
try{
    // fire up COM
    HRESULT hr = CoInitialize(0);
    if(FAILED(hr))
    {
        cout

Originally posted 2013-11-09 23:37:46.