Try
Dim SQLconnect As New SQLite.SQLiteConnection()
Dim SQLcommand As SQLiteCommand
SQLconnect.ConnectionString = "Data Source=" & Application.StartupPath & "\Database\db" & ";"
SQLconnect.Open() ' VS highlights this line
SQLcommand = SQLconnect.CreateCommand
SQLcommand.CommandText = "INSERT INTO Table1 (Status) VALUES ('Enabled')"
SQLcommand.ExecuteNonQuery()
SQLcommand.Dispose()
SQLconnect.Close()
Catch ex As Exception
MsgBox("Error: Operation unsuccessfull")
End Try
Ошибка при попытке вставить данные в базу данных,
Ошибка: инициализатор типа для 'System.Transactions.Diagnostics.DiagnosticTrace' выдал исключение.
Как я могу решить эту проблему?
Редактировать 1:

Редактировать 2:
Я пробовал без использования Try Catch Block
Dim sqlConnection As New SQLite.SQLiteConnection()
Dim sqlCommand As New SQLiteCommand
sqlConnection.ConnectionString = "Data Source=db.s3db" 'is it because of the extension of the database ?
sqlConnection.Open()
sqlCommand = sqlConnection.CreateCommand()
sqlCommand.CommandText = "INSERT INTO Table1 (Status) VALUES ('Enabled')"
sqlConnection.Close()
Это из-за расширения базы данных? Я использовал sqlite Admin для создания таблиц
Редактировать 3:
Я только что попробовал в VS 2008, он работает без нареканий. Почему он не работает в VS 2010. Это как-то связано с файлом app.config? или .net framework 4?
Это то, что я добавил в файл app.config
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
<configSections>..................