Hello i have an big problem.

I use the ADO.NET Provider Version 1.40.0 with MS Visual-Studio 2005 ans
VisualBasic. 

When i first open the Database and create a Transaction and read the
Database is all OK.

Codesniped:

    Using sqLiteConnection As System.Data.SQLite.SQLiteConnection = New
System.Data.SQLite.SQLiteConnection( _
                                                                   "Data
Source=" + strFileName + ";Version=3;")
         sqLiteConnection.Open()
         Using sqLiteTransaction As System.Data.SQLite.SQLiteTransaction =
sqLiteConnection. _
                                   
BeginTransaction(IsolationLevel.ReadCommitted)
            Using sqLiteCommand As System.Data.SQLite.SQLiteCommand =
sqLiteConnection.CreateCommand()
               'Datensatzanzahl holen
               sqLiteCommand.CommandText = "SELECT COUNT(Punktnummer) FROM
Punkte;"
               intAnzahlDatansaetze = CInt(sqLiteCommand.ExecuteScalar)
               'Datensätze holen
               sqLiteCommand.CommandText = "SELECT * FROM Punkte;"
               Using sqLiteDataRead As System.Data.SQLite.SQLiteDataReader =
sqLiteCommand.ExecuteReader()
                  ' vorhandene Koordinatenliste leeren
                  Me.KoordPktListe.Clear()
                  'Waitform sichtbar machen 
                  Me.WaitFormShow(boShowWaitForm, "... lese die
Punktdatenbank aus", intAnzahlDatansaetze)
                  While (sqLiteDataRead.Read())
                     'Waitform Step
                   .
                   . 
                   .
               End Using 'sqLiteDataRead
            End Using 'sqLiteCommand
            sqLiteTransaction.Rollback()
         End Using 'sqLiteTransaction
         sqLiteConnection.Close()
      End Using 'sqLiteConnection


After this i Open the Database and read is also all OK.

But open the Database and write (Insert, Delete or Update) than crashed.

Codesniped:

      If (Not My.Computer.FileSystem.FileExists(Me.FileName)) Then Exit Sub
      Using sqLiteConnection As System.Data.SQLite.SQLiteConnection = New
System.Data.SQLite. _
                                    SQLiteConnection("Data Source=" +
Me.FileName + ";Version=3;")
         Using sqLiteTransaction As System.Data.SQLite.SQLiteTransaction =
sqLiteConnection. _
                                   
BeginTransaction(IsolationLevel.ReadCommitted) === Crash=== 
            Using sqLiteCommand As System.Data.SQLite.SQLiteCommand =
sqLiteConnection.CreateCommand()
               sqLiteCommand.CommandText = "DELETE FROM Punkte WHERE
Punktnummer='" + poPDB.Punktnummer + "';"
               Try
                  sqLiteCommand.ExecuteNonQuery()
                  sqLiteTransaction.Commit()
               Catch ex As System.Data.SQLite.SQLiteException
                  sqLiteTransaction.Rollback()
               End Try
            End Using 'sqLiteCommand
         End Using 'sqLiteTransaction
         sqLiteConnection.Close()
      End Using



ErrorMessage:

System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen
Ausnahmefehler verursacht. ---> System.InvalidOperationException: Der
Vorgang ist aufgrund des aktuellen Zustands des Objekts ungültig.
   bei System.Data.SQLite.SQLiteConnection.BeginTransaction(Boolean
deferredLock)
   bei System.Data.SQLite.SQLiteConnection.BeginTransaction(IsolationLevel
isolationLevel)
   bei KoordTools.ClassPointList.AdjustMePointIntoPDBFilePoint(String
strFileName, ClassPoint& poMePoint, ClassPoint& poPDBPoint) in
D:\Projekte\AutoCAD\Programmierung\DOTNet\KoordTools\KoordTools\ClassPointList.vb:Zeile
995.
   bei KoordTools.ClassPointList.AdjustMePointIntoOtherPoint(ClassPoint&
poMePoint, ClassPoint& poOtherPoint) in 

System.Data.SQLite
    Assembly-Version: 1.0.40.0.
    Win32-Version: 1.0.40.0.
    CodeBase:
file:///C:/WINDOWS/assembly/GAC_32/System.Data.SQLite/1.0.40.0__db937bc2d44ff139/System.Data.SQLite.dll.


Why?

regards Mario
-- 
View this message in context: 
http://www.nabble.com/Error-by-Creating-a-Transaction-%28Sorry-ErrorMessage-in-German%29-tf3505300.html#a9789406
Sent from the SQLite mailing list archive at Nabble.com.


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to