|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
The type initializer give me an error Hi, I am trying to open an OleDb connection for access it gives me the following error. The type initializer for 'System.Transactions.Diagnostics.DiagnosticTrace' threw an exception. Code: Private Sub OpenConnection() If _connection Is Nothing Then _connection = New OleDb.OleDbConnection(_connStr) _connection.Open() Else If _connection.State = ConnectionState.Open Then Else _connection.Open()<------- ERRROR HERE End If End If End Sub |
#2
| |||
| |||
Re: The type initializer give me an error Well i think you are getting confused with the concept of ADO.NET Since you are opening the connection but not closing it. You are trying to open the connection which is already open. Try Connection.Closed() I think this is your problem. |
#3
| |||
| |||
Re: The type initializer give me an error Thanks for the help I think my code is wrong! I need to do this other way! |
![]() |
|
Tags: access, adonet, oledb connection, type initializer |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HTC Sense give 404 error in HTC Sensation XL | Bishwajeet | Portable Devices | 4 | 29-11-2011 01:44 AM |
my BSNL card give the error 619 while connecting to the internet | feNRE123 | India BroadBand | 4 | 20-03-2011 03:25 AM |
Call of Duty: Black ops 3D Vision give error | Raveroy | Video Games | 4 | 08-12-2010 10:40 AM |
Certain Websites give error in Mozilla firefox | Adikavi | Technology & Internet | 4 | 02-03-2010 08:13 AM |
Windows Update Website Give Error message | ABBOTT | Technology & Internet | 3 | 03-03-2009 07:19 PM |