Hi,
I am getting Exception while connecting to database:
The type initializer for 'System.Transactions.Diagnostics.DiagnosticTrace' threw an exception.
My Code:
Con = New OdbcConnection(ConnectionString)
Con.Open() ' **Geeting Exception here**
tmpdt.Clear()
Cmd = New OdbcCommand(Str)
Cmd.CommandType = CommandType.Text
Cmd.Connection = Con
Cmd.CommandTimeout = 0
OdbcAd = New OdbcDataAdapter(Cmd)
OdbcAd.Fill(tmpdt)
I read many solution but they all suggesting to delete congig.app file and rebuild. But i don't have config file. Please help.I am not getting any solution.
Regards, Preeti