Hello,
i have new information to this Error. I have make an new Projekt with a new
Database.
The Error begins by Create Connection:
Source:
Private Sub Read_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ReadDB.Click
Dim FileName As String =
System.IO.Path.GetDirectoryName(Application.ExecutablePath) + "\Test.pdb"
If (Not System.IO.File.Exists(FileName)) Then
MsgBox("Fehler: " + vbCrLf + "Datei: " + FileName + vbCrLf +
"exestiert nicht.", MsgBoxStyle.Exclamation Or MsgBoxStyle.OkOnly, "FEHLER
FileExists")
End If
-> Using SQLiteConn As SQLiteConnection = New SQLiteConnection("Data
Source=" + FileName)
Try
Using SQLiteTrans As SQLiteTransaction =
SQLiteConn.BeginTransaction()
Try
LB_Show.Items.Clear()
Using sqLiteCommand As System.Data.SQLite.SQLiteCommand =
SQLiteConn.CreateCommand()
Dim RowCount As Integer = 0
sqLiteCommand.CommandText = "SELECT * FROM Test;"
Using sqLiteDataRead As
System.Data.SQLite.SQLiteDataReader = sqLiteCommand.ExecuteReader()
' vorhandene Koordinatenliste leeren
While (sqLiteDataRead.Read())
RowCount += 1
LB_Show.Items.Add(sqLiteDataRead.GetString(0) + "
= " + sqLiteDataRead.GetString(1))
End While
LB_Show.Items.Add(RowCount.ToString + " Datensätze
gelesen")
End Using
End Using
Catch ex As Exception
MsgBox("Fehler: " + vbCrLf + ex.Message,
MsgBoxStyle.Exclamation Or MsgBoxStyle.OkOnly, "FEHLER Read in Transaction")
SQLiteTrans.Rollback()
End Try
End Using
SQLiteConn.Close()
Catch ex As Exception
MsgBox("Fehler: " + vbCrLf + ex.Message, MsgBoxStyle.Exclamation
Or MsgBoxStyle.OkOnly, "FEHLER Read in Connection")
End Try
End Using
End Sub
I'm set a Breakpoint to the Code on "Using SQLiteConn As SQLiteConnection =
N..." and
the codemonitoring in VS get the following Information
SQLiteConn = {System.Data.SQLite.SQLiteConnection}
+ ServerVersion = {"Der Vorgang ist aufgrund des aktuellen Zustands des
Objekts ungültig."}
++Data = {System.Collections.ListDictionaryInternal}
++Message = "Der Vorgang ist aufgrund des aktuellen Zustands des Objekts
ungültig."
++Source = "System.Data.SQLite"
++StackTrace = " bei
System.Data.SQLite.SQLiteConnection.get_ServerVersion()"
The "System.Data.SQLite.SQLiteConnection.get_ServerVersion()" make the
Exception ?!
And "BeginTransaction()" throw the Exception ?!
regards Mario
--
View this message in context:
http://www.nabble.com/Error-by-Creating-a-Transaction-%28Sorry-ErrorMessage-in-German%29-tf3505300.html#a10012034
Sent from the SQLite mailing list archive at Nabble.com.
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------