There is something I came across a while back when migrating an old VB6 application to .NET. Everything was fine but had some roadblocks with DAO in VB6. Typically in VB6 all the data objects are created using DAO and migrating it to ADO.NET is simple except one area. There is a functionality of RepairDatabase which is not present in the ADO.NET. I left that as it is and to do that imported Interop.DAO.dll (3.51 version) in new .NET application. RepairDatabase method is not present in DAO 3.6 onward, will discuss it later.
The issue faced, even though it is working well in development environment but in production environment it is throwing me error.
System.Runtime.InteropServices.COMException (0x80040112): Creating an instance of the COM component with CLSID {00000010-0000-0010-8000-00AA006D2EA4} from the IClassFactory failed due to the following error: 80040112.
Googled and got confused, nothing specific and nothing conclusive. So, started gathering information from different sources and tried to get to some conclusion...
What is DAO?
(Data Access Objects) was the first object-oriented interface that exposed the Microsoft Jet database engine (used by Microsoft Access) and allowed Visual Basic developers to directly connect to Access tables - as well as other databases - through ODBC. DAO is suited best for either single-system applications or for small, local deployments. Here is a good post to help you out.
The issue faced, even though it is working well in development environment but in production environment it is throwing me error.
System.Runtime.InteropServices.COMException (0x80040112): Creating an instance of the COM component with CLSID {00000010-0000-0010-8000-00AA006D2EA4} from the IClassFactory failed due to the following error: 80040112.
Googled and got confused, nothing specific and nothing conclusive. So, started gathering information from different sources and tried to get to some conclusion...
What is DAO?
(Data Access Objects) was the first object-oriented interface that exposed the Microsoft Jet database engine (used by Microsoft Access) and allowed Visual Basic developers to directly connect to Access tables - as well as other databases - through ODBC. DAO is suited best for either single-system applications or for small, local deployments. Here is a good post to help you out.
Reason for this error is Data Access Objects (DAO) is not properly registered. But when you try to register using regsvr32, DAO 3.51 it fails as there is no entry point. but thats not an issue with DAO 3.6. There are some major difference between 3.5 and 3.6. The later has been totally revamped, this is by design to match Microsoft Jet 4.0.
As per the Microsoft recommendation
RDO and ADO can still be used in code from Visual Basic 2008, with some trivial modifications. However, Visual Basic 2008 does not support DAO and RDO data binding to controls, data controls, or RDO User connection. We recommend that if your applications contain DAO or RDO data binding you either leave them in Visual Basic 6.0 or upgrade the DAO or RDO data binding to ADO before upgrading your project to Visual Basic 2008, as ADO data binding is supported in Windows Forms. Information on how to upgrade DAO or RDO to ADO in Visual Basic 6.0 is available in the Visual Basic 6.0 Help.
Here is a surprise...
In Data Access Object (DAO) 3.6, the RepairDatabase method is no longer available or supported. This is by design to match Microsoft Jet 4.0. If you need this functionality, you can use the CompactDatabase method, which also repairs a Microsoft Jet database. Registering DAO 3.6 dll has no issue. Compacting a Jet/ACE database first detects if there are any problems in need of repair and if there are none, it skips the repair step and just compacts the file (rewriting data and index pages in contiguous data files and discarding unused data pages and updating all statistics and internal pointers, etc.).
In JRO if you compact a Access 97 database it will convert to Access 2000 format because even though JRO can read the Access 97 file it no longer support it and it is by design.
Following research implementation has two sections one Repairing and Compacting database using DAO and JRO. You may need to include the DAO 3.6 dlls in your application folder.
For that Add Following COM reference:
Furthur Readings
http://msdn.microsoft.com/en-us/library/office/aa164825(v=office.10).aspx
http://msdn.microsoft.com/en-us/library/aa984815(v=vs.71).aspx
http://msdn.microsoft.com/en-us/library/e80y5yhx(v=vs.110).aspx
As per the Microsoft recommendation
RDO and ADO can still be used in code from Visual Basic 2008, with some trivial modifications. However, Visual Basic 2008 does not support DAO and RDO data binding to controls, data controls, or RDO User connection. We recommend that if your applications contain DAO or RDO data binding you either leave them in Visual Basic 6.0 or upgrade the DAO or RDO data binding to ADO before upgrading your project to Visual Basic 2008, as ADO data binding is supported in Windows Forms. Information on how to upgrade DAO or RDO to ADO in Visual Basic 6.0 is available in the Visual Basic 6.0 Help.
Here is a surprise...
In Data Access Object (DAO) 3.6, the RepairDatabase method is no longer available or supported. This is by design to match Microsoft Jet 4.0. If you need this functionality, you can use the CompactDatabase method, which also repairs a Microsoft Jet database. Registering DAO 3.6 dll has no issue. Compacting a Jet/ACE database first detects if there are any problems in need of repair and if there are none, it skips the repair step and just compacts the file (rewriting data and index pages in contiguous data files and discarding unused data pages and updating all statistics and internal pointers, etc.).
In JRO if you compact a Access 97 database it will convert to Access 2000 format because even though JRO can read the Access 97 file it no longer support it and it is by design.
Following research implementation has two sections one Repairing and Compacting database using DAO and JRO. You may need to include the DAO 3.6 dlls in your application folder.
For that Add Following COM reference:
- Microsoft DAO 3.6 Object Library
- Microsoft Jet and Replication Objects 2.6 Library
namespace RepairDB { class Program { static void Main(string[] args) { try { DAO.Database dd; DAO.DBEngine db = new DAO.DBEngine(); dd = db.OpenDatabase(@"d:\KSDB1.mdb", null, null, ";pwd=KSTEST1"); dd.Close(); } catch (Exception e) { Console.WriteLine(e.Message); } Console.WriteLine("Open and Close of database successful using DAO."); try { File.Delete(@"d:\KSDB1_Tmp.mdb"); if (File.Exists(@"d:\KSDB1.mdb")) { DAO.DBEngine db = new DAO.DBEngine(); db.CompactDatabase(@"d:\KSDB1.mdb", @"d:\KSDB1_Tmp.mdb", null, null, ";pwd=KSTEST1"); File.Delete(@"d:\KSDB1.mdb"); File.Move(@"d:\KSDB1_Tmp.mdb", @"d:\KSDB1.mdb"); } } catch (Exception e) { Console.WriteLine(e.Message); } Console.WriteLine("Compacting and Repair database successful using DAO."); try { File.Delete(@"d:\KSDB1_Tmp.mdb"); if (File.Exists(@"d:\KSDB1.mdb")) { JRO.JetEngine jj = new JRO.JetEngine(); jj.CompactDatabase(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\KSDB1.mdb;Jet OLEDB:Database Password=KSTEST1", @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\KSDB1_Tmp.mdb;Jet OLEDB:Database Password=KSTEST1"); File.Delete(@"d:\KSDB1.mdb"); File.Move(@"d:\KSDB1_Tmp.mdb", @"d:\KSDB1.mdb"); } } catch (Exception e) { Console.WriteLine(e.Message); } Console.WriteLine("Compacting and Repair database successful using JRO."); Console.ReadLine(); } } }
Furthur Readings
http://msdn.microsoft.com/en-us/library/office/aa164825(v=office.10).aspx
http://msdn.microsoft.com/en-us/library/aa984815(v=vs.71).aspx
http://msdn.microsoft.com/en-us/library/e80y5yhx(v=vs.110).aspx
Repair your corrupt database then try Recovery for Access tool to repair lost .mdb & .accdb files. It recover various database objects like tables, vies, macros, modules, queries, etc.It supports MS Access 2010, 2007, 2003, 2002 & 2000.
ReplyDeleteRead More:- http://www.filesrecoverytool.com/access-file-recovery.html/"
I would like to suggest this application, which will repair your access data in trial version and see you the preview of recover data. http://www.filesrepairtool.com/access-file-repair.html/
ReplyDeleteVery nice post I really enjoyed it...You can also visit my website for
ReplyDeleteEscort services in Bangalore
Escort services in Kolkata
Escort services in Lucknow
Escort services in Jammu
Escort services in Chandigarh
Escort services in Guwahati
Escort services in Ranchi
Escort services in Gurgaon
Escort services in Chandigarh
Escort services in Mumbai
Very nice post I really enjoyed it...You can also visit my website for
ReplyDeleteEscorts in Bangalore
Escorts in Kolkata
Escorts in Lucknow
Escorts in Jammu
Escorts in Chandigarh
Escorts in Guwahati
Escorts in Ranchi
Escorts in Gurgaon
Escorts in Chandigarh
Very nice post I really enjoyed it...You can also visit my website for
ReplyDeleteCall Girls in Bangalore
Call Girls in Kolkata
Call Girls in Lucknow
Call Girls in Jammu
Call Girls in Chandigarh
Call Girls in Guwahati
Call Girls in Ranchi
Call Girls in Gurgaon
Call girls in Chandigarh
Call girls in Mumbai
Escorts in Guwahati
ReplyDeleteEscorts in Ranchi
Escorts in Gurgaon
Escorts in Chandigarh
Escorts in Pune
=
Loved your post...You can also visit my website for
ReplyDeleteBangalore escorts
Kolkata escorts
Lucknow escorts
Jammu escorts
Chandigarh escorts
If you are in Jaipur and need beautiful Jaipur Call Girls or white skin Jaipur Call Girls then you can simply book call girls in Jaipur from one of the best escort agency named Jaipur Call Girls. It is No.1 premier escort agency and provide both incall or outcall facility to clients.Please click on the following link to check the official websites Jaipur Call Girls
ReplyDeleteCall Girls in Kolkata
ReplyDeleteCall Girls in Mumbai
Call Girls in Lucknow
Call Girls in Gurgaon
Call Girls in Bangalore
Call Girls in Guwahati
======================
Escorts
======================
Escorts in Kolkata
Escorts in Mumbai
Escorts in Lucknow
Escorts in Gurgaon
Escorts in Bangalore
Escorts in Guwahati
Escort services
======================
Escort services in Kolkata
Mumbai Escort Service
Escort services in Lucknow
Escort services in Gurgaon
Escort services in Bangalore
Escort services in Guwahati
======================
Escort service
======================
Escort Service in Kolkata
Escort Service in Mumbai
Escort Service in Lucknow
Escort Service in Gurgaon
Escort Service in Bangalore
Escort Service in Guwahati
Call girls in Faridabad
ReplyDeleteCall girls in Mumbai
Call girls in Gurgaon
Call girls in Bangalore
||Call girls in Faridabad||
ReplyDelete||escorts in Faridabad||
||Faridabad escorts||
||Faridabad escorts service||
||escort service in Faridabad||
||call girl Faridabad||
||Faridabad call girls||
||Faridabad escort service||
||independent escorts in Faridabad||
||independent call girls in Faridabad||
ReplyDelete||high profile call girls in Faridabad||
||Russian escorts in Faridabad||
||college call girls in Faridabad||
||college escorts in Faridabad||
||air hostess escorts in Faridabad||
||escort agency in Faridabad||
||vip russian escorts in faridabad||
|| vip escorts services in faridabad||
If you're seeking Faridabad independent Escorts Agency then Call us to rent the best VIP Escorts in Faridabad. Get very hot erotic sex services 24/7 Hours.
ReplyDelete||call girls in faridabad||
||faridabad escorts||
||faridabad escort||
||faridabad call girls||
||faridabad call girl||
||faridabad escort agency||
||escort services in faridabad||
||faridabad escort service||
||housewife escorts in faridabad||
||college escorts in faridabad||
ReplyDelete||russian escorts in faridabad||
||college call girls in faridabad||
||independent escorts in faridabad||
||independent call girls in faridabad||
||high profile escorts in faridabad||
||call girls in Ballabgarh||
||call girls in Surajkund||
||call girls in Greenfield||
ABC Assignment Help is an incomparable online Engineering assignment help company delivering excellent academic assignments, essays, coursework and reports. Through a team of over 3000 subject experts we ensure individual attention to every student making the assignment help experience completely personalized in nature. With our round the clock services, you can be assured of high grades every time.
ReplyDeleteNice post! Your writing effort shows in your content that have amazing information. Thanks for this article. Keep up the good work!! Also visit here for mobile price all in Bangladesh.
ReplyDeleteABC Assignment Help is an incomparable online All assignment help company delivering excellent academic assignments, essays, coursework and reports. Through a team of over 3000 subject experts we ensure individual attention to every student making the assignment help experience completely personalized in nature. With our round the clock services, you can be assured of high grades every time.
ReplyDeleteAt Myassignmenthelp with our customized services we cater to every individual’s educational requirement and content that is well researched and the quality of the information is versatile our expert academicians in Humanities assignment help look into every detail of what is required and work efficiently into inculcating the most academically approved information that can be used for your Assignments.
ReplyDeleteNice post!..good information,it is really helpful..it really impressed me alot and i just loved it.Thanks for posting such an informative content: Local Packers And Movers Bangalore
ReplyDelete
ReplyDeleteIf you are staying in any other accommodation or in any hotel then Call Girls in Kolkata are available for you and you can tell and we will do all the arrangement for you. We will send our best You must elaborate us that what kind of girl you want, and what kind of service you are looking for, you want for a full night or you want her for some hours. You can also take her out for any party or event. It depends upon your choice and desire.Check our other services...
Russian Call Girls in Jaipur
Russian Call Girls in Aerocity
Hi Profile Escorts in Rishikesh
Excellent information Providing by your Article, thank you for taking the time to share with us such a nice article. Amazing insight you have on this, it's nice to find a website that details so much information about different artists. Kindly visit the LiveWebTutors website we providing the best assignment help services in Australia.
ReplyDeleteFor More Info: Essay Writing Help
I suggest all members choose Online Assignment Help Australia for the best guideline in your academia. The perfect and expert assistant your requirement and learning assignment project by the university.
ReplyDeleteEscort services in Kishangarh
ReplyDeleteEscort services in Pushkar
Escort services in Udaipur
Escort services in Ajmer
We provide Technical Help to our user by a diagnosis of their computer and other devices. And if there is an issue to be solved, we give out the solution. This helps the user to avoid any existing issue.
ReplyDeletewww.webroot.com/safe | Magellan GPS Update | TurboTax Support | Webroot removal tool | Office.com/setup | AOL Mail | Kaspersky Login.
Thanks for sharing such a piece of wonderful information. Moreover, it is very true that Entertainment company is ruling the world.
ReplyDeleteThere is everything fame, money but first, you need to set-up your brand availability. Promote your brand, gain customers’ trust, present what the audience wants,
and you will be able to rule the entertainment company.
entertainment company
Thank you for the auspicious writeup. It if truth be told was a enjoyment account it. Glance advanced to more added agreeable from you! However, how can we keep up a correspondence? We create together, measure always, and revise often, ensuring your customers stay at the focus. Digital Marketing Services
ReplyDeleteTHANK YOU FOR VISITING MY WEBSITE:-
ReplyDeleterussian escorts in gurgaon
housewife escorts in gurgaon
gurgaon escort services
gurgaon escorts
escorts in gurgaon
escort services in gurgaon
gurgaon call girls
call girls in gurgaon
THANK YOU FOR VISITING MY WEBSITE:-
escorts in lucknow
ReplyDeletelucknow escorts
call girls in lucknow
escort service in lucknow
russian escorts in lucknow
lucknow escort services
lucknow call girls
��Call girls in jaipur
ReplyDelete��Call girls in Jaipur
��Call girls in Jaipur
��Call girls in Delhi
��Call girls in Guwahati
��Call girls in Guwahati
��Call girls in Guwahati
��Call girls in Guwahati
If you are looking for a good call girls in Gurgaon, then you have come to the right place, we can provide you call girls at a cheap and good rate, for this you can contact us on our web site or our number. Call Girls In Gurgaon With Photo
ReplyDeleteThe Nursing assignment help offered by us is the profoundly required and requested assignment help services of the whole globe where numerous school and college-level students look for our help and evaluation help. Here you will locate the best help and scholarly assistance for your nursing assignments and will score first-rate grades in your evaluations.
ReplyDeleteSuch a wonderful information blog post on this topic allassignmentservices.com provides assignment service at affordable cost in a wide range of subject areas for all grade levels, we are already trusted by thousands of students who struggle to write their academic papers and also by those students who simply want assignment maker to save their time and make life easy.
ReplyDeleteI really loved your post so much that I cant resist writing comment...Please check mine as well
ReplyDeleteEscorts in Guwahati
Escorts in Guwahati
Escorts in Guwahati
Escorts in Guwahati
I really loved your post so much that I cant resist writing comment...Please check mine as well
ReplyDeleteCall girls in Bhubaneswar
Call girl in Bhubaneswar