Click here to Skip to main content
15,905,781 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i write this code i get this error
ServerConnection svconn = new ServerConnection("M218-DINA", "DM", "1234567");
Server sv = new Server(svconn);

Database db = sv.Databases["oldDatabase"];
on the line Database db = sv.Databases["oldDatabase"];
System.TypeInitializationException: The type initializer for 'PropertyMetadataProvider' threw an exception
Posted
Comments
Hermann Jung 10-Jul-14 10:40am    
This means your code is executed within the static constructor or initialization of static fields and your code fails.
I) Typeinitializer should never cause exceptions.
II) See InnerException for the reason.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900