Skip to main content

the type initializer for threw an excpetion ...??? HRESULT:0x8004294F

Recently I faced this problem. It took me a while to understand where did I falter. 
One of my client was running a Membership Management/Subscription software developed by me. Data was saved in an Access File, as it was a standalone application. Soon, his requirement changed. He needed the data to be available globally. Time was scarce, so I decided against developing a web-application and just convert the Access database to MySql and host it on a server. I did all the modifications inside the code to suite my purpose. The goal was to let him have the rich client experience with the data available online. Application setup would also be available online for him to download, install and run it where-ever(windows machine) he would want to.


After completing the code transformation, I got stuck at this point. This error was staring at me blankly - the type initializer for <Module> threw an excpetion, with HRESULT:0x8004294F as a warning.


I tried searching for it online but couldn't pinpoint the exact problem. After a lengthy session of hair-pulling, I decided to encase the problematic code in the try catch bracket. And voila, the problem was related to Mysql. 


I deduced that it must be related to MySql connection. I had saved the connection string in the Application settings string. It was for oledb connection type and not for MySql. So, I replaced the original connection string with the appropriate connection string for my MySql Database.


Thus, I solved the problem. 


Hope, you would get some idea out of my experience and save your hair which maybe already scarce if you are seriously into programming.


Shameless Advertising - I am an IT consultant Developing Applications (Desktop/Web), Designing Websites, Customizing Tally.ERP 9, Providing Corporate IT Training, and Expensive but well worth it Computer AMC to Corporate Houses. 
Niraj Kumar
Adore Foundation
+91-9874983989
Post a Comment

Popular posts from this blog

Installing Oracle 9i on RHEL5. (x86)

I must warn you that this article is as it is. It worked when I was installing the combo - a long time ago. I am not sure about the links available in this article. I am not maintaining this article anymore, (other than sprucing it up a bit for better reading). I am completely out of touch with RHEL or Oracle for that matter. Still, dont lose your heart yet. I am sure, with proper searching using the big brother - Google, you will find lots of more information relating to your work to help you finish what you are doing.
Foreword
Recently I joined Sqlstar International for my Oracle DBA course. Everything was going smooth. I completed my SQL Fundamentals with Oracle installed on Windows in my pc. But when classes started for DBA Fundamentals 1 I was at loss, as in my institute oracle was installed on Redhat Linux platform. I could have done all the solution of the text on windows but I decided to configure my own Linux box and install oracle on it to simulate the class environment. So I…

Datatables and Wordpress Integration problem solved.

Note: Download a working demo plugin from this project's github repository.

Like other wordpress developers, I had also faced the problem of integrating datatable(server side processing) with wordpress. I tried every tips, tricks and multiple ways to solve the problem, but couldn't do it. My ajaxified functions of the wordpress simple dint work. I din't have much time and had to finish a small project on time. So, I decided to skip it and go through the developer's way : the plugin developer had suggested and implemented.

I dropped the required php file with some related modifications and called the url of the php file in the datatable options in my project. It worked after few small hiccups. I wasn't satisfied though, as i wanted the wordpress centric solution, instead of using some drop-in file to complement the functionality. I had vowed to look after this problem whenever I could get some time.




(You may visit the url http://www.bearinghouse.net/order-now/ to …

Web Development Dilemma - Part 2

Recently, I got a Job to build an ERP Application (More like Accounting Package with CRM). I started planning for the Application. I had some experience with Tally.ERP 9 and knew a bit about Accounting too. Once again I chose Wordpress Platform for the application development, as I was more comfortable with it. Application was to have multiple advanced features along with some of smart automated data sensing and processing, and selective data push (Semi-Automated) to Tally for Accounting Purpose. The application was to run in a LAN Environment and was connected with the Customer's Website to retrieve Customer Order submitted on the website (Customized Shopping Cart) for further processing. 
I could develop fast in Wordpress, I was familiar with the system and environment. But due to multiple distractions, and tedious job (I hadn't anticipated lengthy coding and timing involved), the project had to be scrapped by the customer. The customer was gracious enough to forgive me, bu…