{"id":1184,"date":"2022-08-30T15:13:47","date_gmt":"2022-08-30T15:13:47","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/unable-to-connect-to-oracle-11g-via-ole-db-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:13:47","modified_gmt":"2022-08-30T15:13:47","slug":"unable-to-connect-to-oracle-11g-via-ole-db-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/unable-to-connect-to-oracle-11g-via-ole-db-collection-of-common-programming-errors\/","title":{"rendered":"Unable to connect to Oracle 11g via OLE DB-Collection of common programming errors"},"content":{"rendered":"<p>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&#8217;t. I thus solved the problem by reinstalling Oracle 11g2 32bit.<\/p>\n<p>I&#8217;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&#8217;m also using the Oracle OLE DB connector.<\/p>\n<p>As you can see, I&#8217;m not trying anything fancy, I&#8217;m merely trying to successfully connect.<\/p>\n<pre><code>CDataSource ds;\nCSession session;\n\nint _tmain(int argc, _TCHAR* argv[])\n{\ntry{\n    \/\/ fire up COM\n    HRESULT hr = CoInitialize(0);\n    if(FAILED(hr))\n    {\n        cout<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2013-11-09 23:37:46. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>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&#8217;t. I thus solved the problem by reinstalling Oracle 11g2 32bit. I&#8217;m trying to connect to a test Oracle 11g2 database via Visual Studio [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1184","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1184"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1184\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}