Search code examples
c#sqliteado.netentity-framework-6ado.net-entity-data-model

SqlLite unexpectedly stop working ado.net entity framework


I have one simple demo project windows form in which I am using sqlite database with Entity Framework 6.2 since last so many times (1 year) (also change from 6.2 to 6.0 but no change).

But recently I have some unexpected error in sqlite database.

I have used Entity Framework to communicate with the database and for all crud operation on SqlLite.

Which is running absolutely fine 2 to 3 days ago but now I can see that entity framework entry is done proper at back end side only but in table it is not available in table and when I stop application running it is also remove from local cache (as per my belief it is storing locally) as well and when I run it again it starts creating the data from the last same id.

I have tried to add new edmx but it is also doing some unexpected behaviour.

It stops working when I go to Next screen to connect Ado.Net with database.

Screen: 1 (When I add new Ado.Net Connection Modal) enter image description here

Screen: 2 (When I click on next button it closes the dialog) enter image description here

Do not have any idea what is happening!

Some one give me a rop to come out from the swamp.

Thanks in advance.


Solution

  • As in my case I was in the same situation may be these steps will solve your problem.

    TRY!!!

    Download the packages as I suggest:

    Go to sqlite site -> Download page click on the System.Data.SQLite

    enter image description here

    after click on it you will be redirected to Download page of the packages .net framework version wise as below screen

    enter image description here

    Download only 86 (32 bit) bit full version (bundle) because they are assigning the cache assembly dll only in 86 (32 bit) version you can see that while installing it it will also copy assembly copy in windows. Always use 86 (32 bit) version because no one knows that what client use at their system 86 or 64 bit so always habit to use 86 version whenever possible so 86 (32 bit) will work in 64 bit but 64 bit will not work in 86 (32 bit).