Error at startup: The database location is not writable or does not exist

Started by Curt

I just started getting this error on upgrade to 5.5.1. I am using an old WINXP PC. I uninstalled 5.5.1 while getting same error using control panel. Went back to 5.5 and still get same error at startup after reboot. No previous problem.
SoftPerfect Support forum - Andrew avatar image

Re: Error at startup: The database location is not writable or does not exist   05 February 2016, 09:36

There should be one extra line in the message giving details on why the error occurs. Could you post here a screen shot of the error with version 5.5.1?
Hi Curt,

I tried to update to 5.5.1 and ended up with all data and settings wiped for the same reason - unable to write to Netwox.db or it doesn't exist.
I'm not happy to try again until any issues are resolved so would be glad to see your screenshot to help sort it out.

Regards,
Rod
It looks DB changed its structure in 5.5.1, "application" table is now "appusage". Lost all records for Usage Report for Applications after restoring usage data from 5.5.

Re: Error at startup: The database location is not writable or does not exist   10 February 2016, 05:09

It looks like a new field was added "IMAGE_ID" and all records prior to 5.5.1 were given a value of "NULL" although the IN/OUT values are there (not 'lost' in one sense, but effectively are lost because they can't be associated with a valid image_id).

Using sqlitebrowser (thanks to Rod) an error is thrown as soon as the db is opened, see attachment 01.

The other two attachments simply show the new db layout. 'Today' is 42407.

J

to be precise: where there was one table there are now 3 tables: appname, appusage and appusage_with_status.
appname has two fields: ID and IMAGE_NAME
appusage has four fields, USAGE_ID, IMAGE_ID and DATA_IN, DATA_OUT
appusage_with_status has seven fields: USER_NAME, DAY, HOUR, IMAGE_NAME and DATA_IN, DATA_OUT and STATUS.
I think Andrew did this to satisfy a user request...
I haven't any long term use for usage by application, and I hardly ever bother to check it, so, after updating to 5.5.1, I didn't notice the impact.

The update to 5.5.1 contained a check for the 'new' tables and, if they were 'old', 'converted' the 'old' to 'new' and recorded that that had been done.
This means that if an 'old' db is subsequently imported, and networx expects the new structure to be there but it isn't, networx gets upset (heh, heh---Rod I assigned some human attributes to a program, I couldn't resist laugh ).

Perhaps Andrew should have had the program check the version of the database every time and perform the conversion again if appropriate.

J
Attachments:
open | download – 01 error.png (13 KB)
open | download – 02 appusage.png (68.4 KB)
open | download – 03 appusage_with_status.png (81 KB)
SoftPerfect Support forum - Andrew avatar image

Re: Error at startup: The database location is not writable or does not exist   10 February 2016, 15:19

Indeed NetWorx upgrades the DB structure when necessary and converts old data to a newer format.

Thing is, there may be a corner case where not all data is converted correctly despite of me double-checking the conversion code. If this happens, I'd love to see an old database that is not correctly converted to a newer format.

Re: Error at startup: The database location is not writable or does not exist   10 February 2016, 21:23

Hi Andrew,
Well if the program checks every time for the need to convert then perhaps the issue is with the combinations of:
Export, Backup & Restore with Applications vs. Hourly Rates.
If an Export was done with 5.5.0 and then Restored after the upgrade to 5.5.1 that could cause and error. (yes/no?)
If a Backup was done with 5.5.0 and then Restored after the upgrade to 5.5.1 that could cause and error. (yes/no?)

The [Export] button has two options, Automatic and Byte and 3 file types csv, HTML & txt.
It exports only the Report Data for the active tab, i.e. it's not a complete database substitute.
When I tried Automatic & txt, I got an error "Assertion failure (G:[Dev]\common\Common.Report.TXT.pas, line 132)". I clicked [OK]

The [Backup] button only creates a DB file, but it's smaller on disk than the original, whereas, a 'copy' made using Explorer is exactly the same size as the original.

The [Restore] button has 3 file types: DB, sqbackup and csv, however the csv is noted on Restore as being a NetMeter file, not a NetWorx file. If the csv is created as a NetWorx file and then Restored supposedly as a NetMeter file that could introduce and error.

I haven't had a problem with 5.5.1 because I always stop Networx, use exploer to make a copy on a different drive and then restart Networx or modify the original and restart networx. If there's a problem I can stop Networx, copy my 'copy' to replace the original and restart Networx without any problem.

If the users who are having problems are trying to Restore a csv file created prior to 5.5.1 into 5.5.1 then there would very likely be an error. I know that Rod has said in another thread that he's used the HTML & csv files as a means to modify the networx.db.

@CURT and @Rod:
can you provide more information about the exact things that you did? For example, it appears in his post that Curt said that he started getting his error immediately after upgrading to 5.5.1 without attempting to Restore any file/db. Is that true? Do you Restore a csv file? etc

J
Quote

Praxis

can you provide more information about the exact things that you did?
For example, it appears in his post that Curt said that he started getting his error immediately after upgrading to 5.5.1 without attempting to Restore any file/db. Is that true? Do you Restore a csv file? etc

In my case, Andrew had posted a link to a new build (probably 5.5.1) which ignores applications during un-metered hours. I installed the new build but the installation process reported that either Networx.db could not be found or it was not writeable. A few more messages and button-clicks later Networx completed the program installation but all settings and usage data had been wiped.

System Restore and a fortunate habit of making backups before upgrades and I was back to 5.5.0 with settings and data intact, more or less.
SoftPerfect Support forum - Andrew avatar image

Re: Error at startup: The database location is not writable or does not exist   11 February 2016, 10:51

Since you have a backup, would you share your version 5.5.0 DB file, so I can re-test the upgrade process and see what happened?
How do I send/post a copy to you?
SoftPerfect Support forum - Andrew avatar image

Re: Error at startup: The database location is not writable or does not exist   12 February 2016, 12:28

Please upload it here (compressed to a ZIP file).
Hi again Andrew,

Now you've got a copy of my Networx.db file, perhaps you could have a look at the config table's ConnMon entries - why does the program keep adding repeats of the 3 sites originally entered? You will note that there were 190+ entries of the same 3 sites. I have not added them but it continuing to happen unless I delete them before restoring from a back-up.

Rod.

Re: Error at startup: The database location is not writable or does not exist   13 February 2016, 04:40

Quote

Rod

I have not added them but it continuing to happen unless I delete them before restoring from a back-up.
Rod.


Hey Rod, I'm a bit confused here.
You say that you 1) delete the 190+ entries followed by 2) a restore from a backup.
Wouldn't restoring a backup include restoring the 190+ entries?

Just to be absolutely clear, do you do your backups and restores ONLY using the [Backup] and [Restore] buttons?
Or, do you sometimes use a csv file (or SqliteBrowser) to modify the backup before you restore it?

It might help if you also uploaded your backup file for Andrew to test the restore part of the problem...

J

Re: Error at startup: The database location is not writable or does not exist   13 February 2016, 04:42

Rod,
are more entries added each time that you start/run networx, i.e. 190+ becomes 193+ becomes 196+.... etc. ?
J
@ Praxis:

I delete the excess ConnMon entries from the back-up (using SQLite browser) and restore the modified back-up into Networx. I use only the Backup/Restore buttons in Networx to Back-up and Restore. I don't use .csv files because deleting multiple records in SQLite browser is straightforward to do. There doesn't seem (yet) to be any pattern to the addition of the ConnMon records but it has sometimes happened in vast numbers. I am checking Connection Monitor manually from time to time and have occasionally deleted a few new instances - strangely, always in threes.

Bearing in mind that I am still using 5.5.0, I don't think Andrew would want to spend time fixing this unless the problem is also in 5.5.1 and I don't know, at this point, whether that is the case.
SoftPerfect Support forum - Andrew avatar image

Re: Error at startup: The database location is not writable or does not exist   13 February 2016, 11:51

Thanks Rod, I have identified and fixed two bugs in version 5.5.1 that I reproduced with your backup file:
  1. The list of applications did not convert correctly from earlier versions.
  2. Several entities doubled: connection monitor, LAN ranges and automatic reports.

The second issue occurred whenever a DB backup was restored. The new build is available here.

Note: When the list of applications is converted to 5.5.1 from any earlier version and you have some hours marked as Unmetered, this may result in some past application records seemingly disappear. This happens because previously the applications were recorded on a per day basis, while now it's on a per hour basis. So if after the conversion an application happens to be assigned to an unmetered hour, it will not be visible in the report. Anyway, this only affects old application records. All new ones should be recorded correctly.
Quote

Andrew

I have identified and fixed two bugs in version 5.5.1 that I reproduced with your backup file...

OK. New version of 5.5.1 installed without a hitch - usage data and settings intact as far as I can see after a brief scan through.

There are multiple copies of the next date for automatic reports. I have deleted all but one using the Networx interface and will keep an ongoing watch.

All application data has been wiped but will keep an ongoing watch on that too since the data format has changed between versions.

Thanks again guys.
Hi again Andrew,

Quick question.

If I Restore a backup into Networx without having first Reset the data, will the restored data overwrite the existing data or will it merely add the Restored data to that already there?

It has occurred to me that I, myself, may have inadvertently been the author of the multiple copies of records if each time I Restore a modified back-up into Networx the NEW data is merely added to that already existing (because I had not Reset Networx first).

Hope that makes sense.
SoftPerfect Support forum - Andrew avatar image

Re: Error at startup: The database location is not writable or does not exist   14 February 2016, 23:55

When restoring from a .DB file, all old records will be gone. There's no need to reset it first.

Essentially the DB backup contains both the settings and usage records (earlier versions that used a XML file only backed up usage records).
Quick update

Just to say Networx 5.5.1 behaving predictably. We're getting along with each other just fine.

Praxis will love the way I put that. wink

Re: Error at startup: The database location is not writable or does not exist   20 February 2016, 21:48

Rod, you show great perspicacity in your analysis, laugh

J

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 **         ********  **         **     **  **    ** 
 **    **   **        **    **   **     **  ***   ** 
 **    **   **        **    **   **     **  ****  ** 
 **    **   ******    **    **   **     **  ** ** ** 
 *********  **        *********   **   **   **  **** 
       **   **              **     ** **    **   *** 
       **   **              **      ***     **    ** 

Message: