Attempt to write a read-only database

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
AlexNek
Posts: 10
Joined: Wed 01 Jul 2015 19:12

Attempt to write a read-only database

Post by AlexNek » Wed 01 Jul 2015 19:47

I don't know why but I have exception "Attempt to write a read-only database" by calling SubmitChanges()

by Devart.Data.Linq.LinqCommandExecutionException.CanThrowLinqCommandExecutionException(String message, Exception e)
by Devart.Data.Linq.DataProvider.b(String A_0, IEnumerable`1 A_1, IEnumerable`1 A_2, Boolean A_3)
by Devart.Data.Linq.DataProvider.a(String A_0, IEnumerable`1 A_1, IEnumerable`1 A_2, Boolean A_3)
by Devart.Data.Linq.Engine.SubmitCommandBuilder.a(IObjectEntry A_0)
by Devart.Data.Linq.Engine.b4.a(IObjectEntry[] A_0, ConflictMode A_1, a A_2)
by Devart.Data.Linq.Engine.b4.a(ConflictMode A_0)
by Devart.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)
by Devart.Data.Linq.DataContext.SubmitChanges()

By previous tests all worked fine but in the table was auto incremented key and was no relation.
This time I need to create tree nodes, so I create first all nodes in memory and then store it to database.

What you could suggest me to test/to check why I receive this message? I enable the log but can't see there any error message.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Attempt to write a read-only database

Post by MariiaI » Thu 02 Jul 2015 09:50

Please specify the version and edition of LinqConnect you are working with, e.g. Professional, Metro, etc.
Please also provide us with a small test project (with LinqConnect model and test database file) with which the issue is reproducible, so that we are able to investigate the issue in more details and find the solution for you in a shortest time.
JIC: It is not necessary to send us the whole project, you could exclude those parts of the project that should not affect the main scenario.

AlexNek
Posts: 10
Joined: Wed 01 Jul 2015 19:12

Re: Attempt to write a read-only database

Post by AlexNek » Thu 02 Jul 2015 15:35

Thank you for a quick response. I'll do it but later because I switched to another task yet. I worked under Windows.
By the way, where is I can found samples for LinqConnect?

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Attempt to write a read-only database

Post by MariiaI » Fri 03 Jul 2015 05:30

LinqConnect documentation is available here:
http://www.devart.com/linqconnect/docs/?
http://www.devart.com/linqconnect/demo.html

LinqConnect samples are available in the "C:\Program Files (x86)\Devart\dotConnect\Linq\Samples\" folder after installing LinqConnect (if the Samples component has been selected during installation).

If this information doesn't help, please describe the scenario you are interested in, so that we are able to provide you with the most suitable information.

AlexNek
Posts: 10
Joined: Wed 01 Jul 2015 19:12

Re: Attempt to write a read-only database

Post by AlexNek » Thu 16 Jul 2015 21:44

I think, I have found the reason.
I've working in Visual Studio and opened simultaneously Entity Designer with database viewer.
And ED lock the database.
What the good news - that after last update it was corrected.
Thank you.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Attempt to write a read-only database

Post by MariiaI » Fri 17 Jul 2015 05:38

Thank you for the response.
If you have any further questions regarding working with LinqConnect, feel free to contact us.

Post Reply