Error in EF sqlite3 & quot; System. Data. Entity. Core. EntityException: An error occurred while starting the transaction on the provider connection. For more information, see internal exceptions .,

Source: Internet
Author: User

EF sqlite3 reports "System. Data. Entity. Core. EntityException: An error occurred while starting the transaction on the provider connection. For more information, see internal exceptions .,

Problem: sqlite3 database operation error using ef framework

Cause: the database file has no access permission.

Solution: You can add the Everyone user permission to the access permission of the folder where the database file is located.

 

Error: "System. Data. Entity. Core. EntityException: An error occurred while starting the transaction on the provider connection. For more information, see internal exceptions. ---> System. data. SQLite. SQLiteException: attempt to write a readonly database \ r \ nattempt to write a readonly database \ r \ n in System. data. SQLite. SQLite3.Reset (SQLiteStatement stmt) \ r \ n in System. data. SQLite. SQLite3.Step (SQLiteStatement stmt) \ r \ n in System. data. SQLite. SQLiteDataReader. nextResult () \ r \ n in System. data. SQLite. SQLiteDataReader .. ctor (SQLiteCommand cmd, CommandBehavior behave) \ r \ n in System. data. SQLite. SQLiteCommand. executeReader (CommandBehavior behavior) \ r \ n in System. data. SQLite. SQLiteCommand. executeNonQuery (CommandBehavior behavior) \ r \ n in System. data. SQLite. SQLiteCommand. executeNonQuery () \ r \ n in System. data. SQLite. SQLiteTransaction. begin (Boolean deferredLock) \ r \ n in System. data. SQLite. SQLiteTransactionBase .. ctor (SQLiteConnection connection, Boolean deferredLock) \ r \ n in System. data. SQLite. SQLiteTransaction .. ctor (SQLiteConnection connection, Boolean deferredLock) \ r \ n in System. data. SQLite. SQLiteConnection. beginDbTransaction (IsolationLevel isolationLevel) \ r \ n in System. data. common. dbConnection. beginTransaction (IsolationLevel isolationLevel) \ r \ n in System. data. entity. infrastructure. interception. dbConnectionDispatcher. <BeginTransaction> B _ 0 (DbConnection t, BeginTransactionInterceptionContext c) \ r \ n in System. data. entity. infrastructure. interception. internalDispatcher '1. dispatch [TTarget, TInterceptionContext, TResult] (TTarget target, Func '3 operation, TInterceptionContext interceptionContext, Action '3 executing, Action '3 executed) \ r \ n in System. data. entity. infrastructure. interception. dbConnectionDispatcher. beginTransaction (DbConnection connection, BeginTransactionInterceptionContext interceptionContext) \ r \ n in System. data. entity. core. entityClient. entityConnection. <> c _ DisplayClass6. <BeginDbTransaction> B _ 4 () \ r \ n in System. data. entity. infrastructure. defaultExecutionStrategy. execute [TResult] (Func '1 operation) \ r \ n in System. data. entity. core. entityClient. entityConnection. beginDbTransaction (IsolationLevel isolationLevel) \ r \ n --- end of internal exception stack trace --- \ r \ n in System. data. entity. core. entityClient. entityConnection. beginDbTransaction (IsolationLevel isolationLevel) \ r \ n in System. data. entity. core. entityClient. entityConnection. beginTransaction () \ r \ n in System. data. entity. core. objects. objectContext. executeInTransaction [T] (Func '1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) \ r \ n in System. data. entity. core. objects. objectContext. saveChangesToStore (SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) \ r \ n in System. data. entity. core. objects. objectContext. <> c _ DisplayClassb. <SaveChangesInternal> B _ 8 () \ r \ n in System. data. entity. infrastructure. defaultExecutionStrategy. execute [TResult] (Func '1 operation) \ r \ n in System. data. entity. core. objects. objectContext. saveChangesInternal (SaveOptions options, Boolean executeInExistingTransaction) \ r \ n in System. data. entity. core. objects. objectContext. saveChanges (SaveOptions options) \ r \ n in the System. data. entity. internal. internalContext. saveChanges () \ r \ n in System. data. entity. internal. lazyInternalContext. saveChanges () \ r \ n in System. data. entity. dbContext. saveChanges () \ r \ n in APPAPI. method. medToken. userlogtailken (String account )",

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.