RE: Database locked in merged application
Please have a look here:
http://kb.4d.com/assetid=77688
TL/DR - you need sign the application, then place it on a disk image (DMG) and then sign the disk image, before transferring the disk image to the other machine.
-Tim
-----Original Message-----
From: 4D_Tech [mailto:4d_tech-bounces@xxx.xxx] On Behalf Of James Knight via 4D_Tech
Sent: Tuesday, December 19, 2017 2:41 PM
To: 4d_tech@xxx.xxx
Cc: James Knight
Subject: Database locked in merged application
Hi
I’ve recently upgraded our database to v15 and see that I should be able to set a default data file in a merged application.
We use the data file only to get the merged application running - all data is stored in a remote MySQL database (not 4D SQL) using MyConnect. Therefore the data file should in principle be capable of being read only for end users - it only stores the connection information for the MySQL database.
There are a number of Macs using network accounts on our network so historically I’ve stored the merged app and the data file in a folder within Users/Shared. But this has always caused issues with upgrading the app and setting permissions for different users.
Ideally I would like to store the merged application in the system Applications folder.
I’ve created a default data file and stored it next to the 4db file. I’ve also selected the ‘Allow read only data file use’ in the data storage section of database settings.
Having built the merged application, it opens just fine, in the location in which it is created.
However, if I move or copy the application to any other location at all, or on to another computer, it refuses to open and gives the message “The data file is locked. Impossible to open database”.
I started by trying to copy it to the Applications folder, but even moving the merged app into the parent folder is enough to give this error.
It’s clearly permissions related - but how can I fix it?
Cheers
James
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-Unsubscribe@xxx.xxx
**********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-Unsubscribe@xxx.xxx
**********************************************************************
I don't have a solution but to better understand the situation:
are you actually using the v15 default.4dd system,
or simply placing a {name}.4dd adjacent to the compiled structure file?
http://doc.4d.com/4Dv15/4D/15/Default-data-file-in-merged-applications.300-2018649.en.html
did you code sign (and verify) your built application?
unlikely, but did you check if the read-only-allow property is passed on to your built application?
(for example, by implementing OPEN SETTINGS WINDOW)
http://doc.4d.com/4Dv15/4D/15.4/DatabaseData-storage-page.300-3285380.en.html
least but not least, always good to include the build number of 4D and the OS.
> 2017/12/20 7:41、James Knight via 4D_Tech <4d_tech@xxx.xxx> のメール:
> It’s clearly permissions related - but how can I fix it?
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-Unsubscribe@xxx.xxx
**********************************************************************