FMDB open database -


i'm trying open database have in project inside resources.

the problem seems impossible find database file! tried complete path, , works, not solution.

i how open it!

i'm using code: db = [fmdatabase databasewithpath:@"bbdd.sql"];

i don't know how find other part of "actual" path.

do have solution me?

thanks!!!!

you need find full path of database in resource bundle, :

nsstring *databasepath = [[nsbundle mainbundle] pathforresource:@"mysqlitedatabasefile" oftype:@"sqlite3"]; 

there's complete example in thread copying data application data folder on iphone


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -