iphone - Sqlite Prepare Failed: No such table <table_name> -


i using sqlite database in iphone app.

here in app used absolute path @"/users/macos/documents/appdatabase.sql

now here want run app on device. requires relative path.

what needs done path database ?

here getting error when try run absolute path on device.

sqlite prepare failed: no such table

i have checked table exist in database.

what should relative path database?

please , suggest.

thanks

you can database path using -

nsarray *documentpaths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes);     nsstring *documentsdir = [documentpaths objectatindex:0];     nsstring *databasepath = [documentsdir stringbyappendingpathcomponent:@"mydb.sqlite"]; 

also delete app simulator or device , run/install again.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -