Below is the error I'm getting
[ERROR] Script Error = Could not retrieve attributes. Error Domain=NSCocoaErrorDomain Code=260 "The operation couldn’t be completed. (Cocoa error 260.)" UserInfo=0xac78000 {NSFilePath=/Users/Blake/Library/Application Support/iPhone Simulator/6.0/Applications/2225E506-D9F5-4DC5-B099-32A0FE2030C3/myApp.app/db/ticklers.db, NSUnderlyingError=0xac77a00 "The operation couldn’t be completed. No such file or directory"} in -[TiDatabaseProxy install:name:] (TiDatabaseProxy.m:126) at db.js (line 16)The line of code it's referring to (starting at line 15):
self.openDB = function() { return Ti.Database.install('/db/myDB.db', 'theMagicdb'); };I don't know why it won't create the directory and the db... that's what I would guess that this does.
2 Answers
Accepted Answer
Fist test if you original database is where you "expect" to be... I spent like 1 day chasing my original sqlite database.
var whereisWalDB=Ti.Filesystem.getFile("/db/myDB.db"); Ti.API.warn('here is the m... fu..: "+whereisWalDB.nativePath+" size:"+whereisWalDB.size);
If size = -1 or 0 you haven't found your original database....
After you find it, everything is as expected.
You also want to be sure that this file: '/db/myDB.db' actually exists.
Your Answer
Think you can help? Login to answer this question!