Click to See Complete Forum and Search --> : OLE Initialization failed
hotsaravana
February 10th, 2009, 12:07 AM
I have created an MFC application in VC++2005
While i am creating i include the "database with file support" option.
I had just do this and insert a "Windows form". design the forms with basic form controls like text boxes and edit boxes.
Now i am attempting to run. It throws a runtime error "OLE Initialization failed. Make sure that the OLE libraries are the correct version"
Alex F
February 10th, 2009, 02:37 AM
Do you try to insert a Windows Form to MFC application? Strange idea with unpredictable results. To add new form (dialog) to MFC application, open Resource View, insert new dialog and generate class from it.
If you want to use Windows Forms, create C++/CLI Windows Forms application, and not MFC. Or even better, use C# for this.
hotsaravana
February 10th, 2009, 07:59 AM
Thanks for your information. As i am beginner, i am not aware about it.
Can u send me an example program for Visual c++ 2005 and MSaccess 2003 with MFC support?
Alex F
February 10th, 2009, 02:40 PM
You can find many examples here:
http://www.codeproject.com/KB/database/
This one looks like good start point:
http://www.codeproject.com/KB/database/simpleado.aspx
darwen
February 11th, 2009, 03:07 AM
If you don't have to learn MFC, then just switch to .NET. The MFC learning curve is a very steep one - it's one of the few things I'm glad I learned from a book because it is very, very difficult to start with. I learned it right back at the start of my programming career - 16 years ago !
And if you have no experience of C++ and want to learn .NET programming I'd recommend learning C# first. It won't get you confused as you've already become.
If you want to learn native windows application programming in C++ don't use anything in the System namespace - this is .NET. If you mix .NET and native C++ this will get you very, very confused too. Again I'd say a book is the best way to learn C++ (make sure it's a book on native C++ and not C++/CLI which is .NET).
Darwen.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.