开发者

XCode copies blank database when doing build

开发者 https://www.devze.com 2022-12-14 14:40 出处:网络
I\'ve noticed that even though I开发者_运维百科 placed my sqlite3 database in the \"resources\" folder, and even though I checked the \"Copy file\" box, when I do a build, XCode creates an empty datab

I've noticed that even though I开发者_运维百科 placed my sqlite3 database in the "resources" folder, and even though I checked the "Copy file" box, when I do a build, XCode creates an empty database toi the application folder it's building...so it's FINDING the database, and OPENING it, but there's nothing IN it, so when I do a sqlite3_prepare_v2, I get a SQLITE_ERROR...

Help! What am I doing wrong?


This tutorial helps you setup an SQL database that will be included with your program:
SQLite To Do Tutorial

That might help you find something you've missed. I'm assuming that since you're getting SQLITE_ERROR you've correctly included the libsqlite3.0.dylib. Are you sure that your database file is valid and was created correctly?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号