Problem: OLE Error 80030002

Problem: OLE Error 80030002

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?


Solution: OLE Error 80030002

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”;