SQLite error on create new project

9
Hi - I'm getting an SQLite error on trying to create new projects in 2.4.3.1. I select 'File > New Project', 'SQLite database file', 'OK', enter the file name & click on 'Save' and I get the following pop up error: 'Error Opening the System project located at C:\Program Files\Mendix\2.4.3.1\System.mpr failed' 'Exception System.Data.SQLite.SQLiteException: Attempt to write a read-only database ... ...' HOWEVER - when I reinstall the software it works OK to begin with, but after I open an existing Mendix project from the SQL/Server repository I can then no longer create a new project using SQLite - I get the error above. Can you help? Thanks, Andy
asked
4 answers
7

The error "Unable to open database file" is apparently given due to a number of different reasons. One of these reasons is that the SQLite library wants to create a so-called journal file in the same directory as the SQLite file. So as it turns out, the Modeler also needs write permissions on the directory that contains the SQLite file (in your case "C:\Program Files\Mendix\2.4.3.1").

Hope this helps.

answered
11

Hi Andrew,

It seems that the Modeler cannot write to the System.mpr file that is located in your Program Files folder. This file needs to be writable in order to open it, because of the way the Modeler handles project databases.

Did you install the Modeler using an administrative account and now use it with an account that has limited access rights? If so, then the Modeler does not have write access to the System.mpr file, and you get the error that you described. It could also be that the read-only flag on the System.mpr file is checked, but that is less likely as you just did a complete reinstall.

Let me know whether this solves your problem.

answered
3

Thanks - I installed & use it with the same userid. I had a look at the read-only flag and it was not checked. However going deeper into the permissions I noticed that the Write flag for users (as opposed to administrators) in the Security tab was not checked, so I checked this but I still got the error. Then I reinstalled it & checked again and the Write flag for users was now checked, so at the moment it appears to be working OK ... but I'm not entirely sure why there were differences between the two installs! Cheers, Andy

answered
2

OK - Here's an update - it was working OK, but it's now failing again with a different SQLite error:

'Error Opening the System project located at C:\Program Files\Mendix\2.4.3.1\System.mpr failed'

'Exception System.Data.SQLite.SQLiteException: Unable to open database file ... ...'

answered