Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> problem opening Oracle database from VC++ program

problem opening Oracle database from VC++ program

From: Grinnell Almy <galmy_at_webvision.com>
Date: 1997/05/09
Message-ID: <33736EB7.27DD6D6C@webvision.com>#1/1

Hello, world...

I am having a problem opening an Oracle database from a Visual C++ 4.0 program using Oracle Objects for OLE 2.1. The database open call consistently fails.

Upon digging through the code, I discovered that one of the things that happens when the database open call is made is that an OLE function named CoCreateInstance() gets called. It is this function which is failing, returning the error message "Error -2147221008 creating instance."

The strange thing is this: There is a sample app that comes with Oracle Objects, called Vsdept2. I am ablle to build and run this app with no problem. I commented out the database open call in the sample app, and replaced it with the call from my app, and the database opens successfully. But in my app, the call fails.

I can only assume that there is something that I have overlooked in my program that is causing CoCreateInstance() to fail, but I don't have a clue what it is. I have gone to great lengths to make my program as similar as possible to the sample app - same build settings, DLLs, header files, etc. Nothing works.

Any ideas? Somebody? Anybody? Please post a message and save a poor befuddled programmer from incurable insanity (if it's not already too late).... Received on Fri May 09 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US