Solved

OLE Error 80030002

Posted on 2007-03-22
7
4,418 Views
Last Modified: 2013-11-25
I am coding a Program in Borland C++ Builder 5.  I am using ADO Connections, queries, datasets, and command components.  I am initializing the COM Objects with CoInitialize(NULL), but i am always getting a return value of S_FALSE.  I realize that this means that the COM Library is already open, but I only do this call once and have a corresponding CoUninitialize for the CoInitialize.  Everything works fine until a try to connect to the SQL Server database with the ADO Component.  As soon as I do an ADOConnection1->Open(), I get an error OLE Error 80030002.  I have found out by reading other issues with this error and found that it is a file not found error.  

I decided to try to run the program on another computer and to my amazement the program works fine.  Obviously there is something wrong with my computer.  Does anybody have an idea as to what I need to look for or fix in order for my computer to run this program?
0
Comment
Question by:trs28
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 11

Expert Comment

by:DeepuAbrahamK
ID: 18785039
ADO components may not be registered/may not be available in your PC. Check whether you have MDAC (Microsoft Data Access Components) installed in your PC.If not, install MDAC from microsoft site and give it a shot.

Best Regards,
DeepuAbrahamK
0
 
LVL 11

Expert Comment

by:DeepuAbrahamK
ID: 18785040
0
 

Author Comment

by:trs28
ID: 18792251
I tried what you requested and there was no change.  I am still having the same problem.  I even went as far as to reinstall the ado components in borland.  Any other suggestions?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:trs28
ID: 18799636
I tried the executable that I compiled on another computer and it did not work.  I found out it is only fails if I compile the executable on my machine.  I think that I may have to reinstall Borland to get rid of the error.  What do you think?
0
 
LVL 1

Accepted Solution

by:
alireza815 earned 500 total points
ID: 20551349
hi
i faced the same problem.
after searching for solution, i found that the adoconnection could not find the UDL file.
so i provide the total phisical path to the UDL file and the problem resolved.
by.
My code : con.connectionstrong="File Name=tc.udl";
true code : con.connectionstring="File Name=c:\\tc.udl";
0
 

Author Comment

by:trs28
ID: 20555123
need to look that up ... i never even considered that ....
0
 

Author Closing Comment

by:trs28
ID: 31407173
I was not able to recreate the error after leaving the project and coming back later.  I have tried the solution in a new project and did agree with this answer.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can i Install a new Data Source on Visual Studio 2 120
Best book to learn C++ 4 96
Trouble with References... 5 67
Mobile apps - web/native or hybrid? 1 120
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question