Can't update sqlite db after inno setup php desktop - sqlite

I have created a php desktop app withe sqlite and a setup file using inno setup. all is ok but I can't add or edit data into sqlite db using same php code after installing setup file that I have made with the working code. Its showing Errroe adding record. Read only file Mind it, before creating setup file I can add or edit dat into sqlite. anyone can help?

I had the same problem. I have solved in this way.
-> Download TakeWonership from this link: https://www.top-password.com/take-ownership-pro.html
then install it. Then you will find this option in the command bar.
-> find the project folder and hit the take ownership option
-> Now uncheck the read-only option from the folder properties.
Then your problem should be solved.. if not then open the project folder and uncheck read-only for all folders individually along with the database file. This works for me.

Related

Using MagicalRecord to prepopulate a database (swift). -wal journal created, however, data not copied to database

(Forgive me since I am not use to posting here. Will do my best)
I am working on an iOS application that will be using a pre-populated database. In my workspace, I have a project for the iOS app and a separate command line tool project to populate the database. I have dragged the database file from the "/Library/Application Support" folder into my iOS project (without using the "Copy Items If Needed"). So when there is a change in the data or additional data is required, I can just run the command line tool to pre-populate the data. From there I will remove the app from the simulator and do a clean. When I run the app, I would think everything would be ok.
It was driving me crazy for the longest but sometimes, I don't see the changes reflected after I remove the app, clean the project and then run. It seems the only way I can get this to work is, after I run the command line tool to pre-populate the database, I have to open the database file using Base, SQLiteStudio or Firefox's sqlite add-on. Once I do that, it seems to work.
When I look in finder, I do see the files .sqlite, sqlite-shm and sqlite-wal. Before opening the database file, I see that the wal file is the biggest (for now it's 2mb). Once I open the file using Base for example, and then close it, the sqlite file is now 2mb.
When the command line is about to finish, I have tried running PRAGMA statements on the file (vacuum, wal-checkpoint) but those did not work. What am I missing here. I also tried using NSManagedObjectContext.MR_defaultContext.saveToPersistentStoreAndWait
I am using the following code to setup and save.
MagicalRecord.setupCoreDataStackWithAutoMigratingSqliteStoreNamed("callithome.sqlite")
MagicalRecord.saveUsingCurrentThreadContextWithBlockAndWait({(context)->Void in
println("Data saved, I hope")})
MagicalRecord.cleanUp()
Any help would be appreciated
You need to enable the DELETE pragma mode for your sqlite store. This will not create the -wal and -shm files. This will make it easier for you to have a single file for use at your pre-populated data store. You will need to use MagicalRecord 3.0 with some of the extra abilities to add custom options to your stores if you'd like o go that route. However, you can still add a store to a coordinator and have that store configured with the proper pragma option as well. That is, MagicalRecord is not necessary if you use normal Core Data.

Where are node-webkit database files stored?

I've just started to work with Node-webkit, and think it's great.
I've setup a db using the "Web SQL Database" option, mentioned here, and it seems to work well. Much like Sqlite, which I'm a bit familiar with.
From the docs, this is implemented using sqlite, so I'd like to be able to find the actual db file this create on disk and look at it with a Sqlite editor, like sqliteman.
Where is the db file saved to?
I couldn't find it in the docs, or by googling it ;-)
Since node-webkit version 0.6.1, you may retrieve the dataPath from the App object. The WebSQL files will be stored within the databases folder.
Wiki: https://github.com/rogerwang/node-webkit/wiki/App
Get the application's data path in user's directory.
Windows: %LOCALAPPDATA%/;
Linux: ~/.config/;
OSX: ~/Library/Application Support/ where is the field in the manifest.
Example:
require('nw.gui').App.dataPath;
I'm on a mac, and I used the tool Sloth to see the files that are opened by an application... Basically it's a GUI version of the command line lsof (list open files)
It pointed me to the following path:
~/Library/Application Support/YOUR_APP_NAME/databases/file__0/
and the sqlite db file was in there!

Oracle 11g is not installing in Windows 7 64bit

i had downloaded the latest version of oracle 11g 64 bit (which is compatible to my system) From oracle Website. while Installing the Oracle into my getting The Following Error.
 - java.lang.NullPointerException
what all i did ?
1. Double click on the setup Application File in the Database folder of Oracle 11g
2. i did not give the email details in Condigure Security Updates Pod.
3.In Installation Options i have selectd the Create and Configure a Database Option.
When i click on Next i am getting the Error
![enter image description here][1]
I was having a similar problem (mentioned in another thread I'm still looking for to respond), but it would fail (without notice) when selecting "desktop class" (step 3). We found that there was a problem with the included javaw.exe file, so used the following start line in the command line (from wherever setup.exe is located):
setup -jreLoc c:\PROGRA~1\java\jdk1.6.0_25
(Modify to reflect the location of an alternate JRE, like the one I used above.)
Hopefully this helps. If not, good luck!
Run the setup file as administrator with a user account that does not have an exclamation mark in it.
After downloading both the files , Keep the second file in first file
In my case i copied the file in file2 in to file 1
from
D:....\win64_11gR2_database_2of2\database\stage\Components
to
D:....\win64_11gR2_database_1of2\database\stage\Components
and don't forgot to update Oraparm configuration settings file under install
according to your jre location and version

Forgot to backup my database before reinstalling WAMP

I uninstalled and reinstalled my WAMP earlier today. I backed up my /www directory but totally forgot about my database (phpmyadmin). I didn't delete my C:/wamp directory, i just reinstalled on top of it.
Does this mean my databases are gone forever? Is there a way to retrieve them? Next time i'll know to export a dump of my databases before I meddle with the installation, I guess I had to learn this the hard way...
Thanks for your help.
That depends if you deleted the data directory or not. By default, wamp's data directory is c:/wamp/bin/mysql/mysql5.x.x/data check there and see if you have some folders with the names of your old databases. In those folders there would be a bunch of .frm, .MYD, and .MYI files assuming you are using myisam. If those files exist then you can recover. Just make sure the datadir in my.ini is pointing to the directory where your database are and restart mysql. It should fix itself automatically.
If you use innodb tables then it's a little more complicated but can be done. Those would be stored in files named ibdata1, ibdata2, etc.
If you don't have any of those files then I'm afraid you're out of luck.
I was able to retrieve mine on windows 7 by doing the following
Open Computer by clicking the Start button , and then clicking Computer.
Navigate to the folder that used to contain the file or folder c:/wamp/bin/mysql/mysql5.x.x/data
Copied it just in case I needed to revert
Right-click it, and then click Restore previous versions. ...
Double-click a previous version of the folder that contains the file or folder you want to restore.

Publishing Web App Project with Visual Studio

I am using Visual Studio 2008 and trying to publish a Web Application Project, but it keeps failing when trying to add files in the project. Below is a sample of the message;
Publishing folder JavaScript... Unable
to add 'JavaScript/hoverIntent.js' to
the Web site. Unable to add file
'JavaScript\hoverIntent.js'. The
specified file could not be encrypted.
This happens for image files too. I am lost as to why it is happening. I should add that I am using Windows 7 build 7100, not sure if this is casuing the issue??
Any help greatly appreciated
I know this is an old topic, but I found it when I googled for the same problem.
My solution was to remove the "Encrypt" flag from Windows Explorer for the files listed (Right click -> Properties -> Advanced)
This blog post at BlackMarble is suggesting that you may have the target directory set to use encryption. Sounds like the exception you're seeing is the inability for the VS publish process to handle that.
To get around this problem:
use VS to publish to an intermediate directory. Somewhere on your PC perhaps.
copy the files yourself (with a batch file maybe) to the server
That's a workaround, at least.
Disable windows encrypted file system in cmd with the following:
fsutil behavior set disableencryption 1
Then restart your PC.
When I had this problem on publishing a Visual Studio 2010 web project either to a local folder or to a host, I was stumped. Visual Studio didn't indicate which files or even folders had caused the problem. I wasn't aware there were any encrypted files in the solution and I couldn't find any. I was unable to update my website.
I googled how to find encrypted files but none of the solutions involving efsinfo.exe were appropriate to Windows 7 then I found an example using the cipher command:
https://superuser.com/questions/58878/how-to-list-encrypted-files-in-windows-7
There were a number of different answers to finding the encrypted files. I used the command prompt method.
I opened a command prompt in the root of my application and did:
D:\Data\Code2011>cipher /s:MyWeb >Encryption.txt
I then did a case sensitive search in Encryption.txt for lines beginning E[space] or 'the file is encrypted'
I found two .htc files which were encrypted in a styles subfolder and was able to unencrypt them in the advanced tab of explorer file properties.
The Web then compiled and published OK.
I had this issue as well. I set the source files properties to not be encrypted but that still wasn't working. Turned out that the files were cached in the temporary deployment folder and I had to uncheck encryption there as well. It probably would have worked to delete the temporary deployment directory but the other way worked.

Resources