how to fix system.typeinitializationexception error

258 Views Asked by At

I'm using mysql2000. The code as below:

Dim MyConnection As SqlConnection
MyConnection = New SqlConnection(Parameters("DBConnectionString"))
MyConnection.Open()

Parameters.xml:

<add key="DBConnectionString" value="Initial Catalog=database; Data Source="localhost";User ID=sa; password=sa" />

The error message shown when it runs

MyConnection = New SqlConnection(Parameters("DBConnectionString"))

I have found a lot of solutions but those doesn't work for me. Its work fine when i run at testing server but not at server 2. Anyone can help? thanks so much.

0

There are 0 best solutions below