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...
我注意到,即使我将sqlite3数据库放在“resources”文件夹中,而且即使我检查了“复制文件”框,当我进行构建时,XCode也会创建一个空的数据库toi应用程序文件夹。它找到数据库,打开它,但是里面什么都没有,所以当我做一个sqlite3_prepare_v2时,我得到一个SQLITE_ERROR。
Help! What am I doing wrong?
的帮助!我做错了什么?
1 个解决方案
#1
0
This tutorial helps you setup an SQL database that will be included with your program:
SQLite To Do Tutorial
本教程将帮助您设置一个SQL数据库,该数据库将包含在您的程序SQLite中,以完成教程
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?
这可能会帮助你找到你错过的东西。我假设由于您得到了SQLITE_ERROR,您已经正确地包含了libsqlite3.0.dylib。您确定您的数据库文件是有效的并且创建正确吗?
#1
0
This tutorial helps you setup an SQL database that will be included with your program:
SQLite To Do Tutorial
本教程将帮助您设置一个SQL数据库,该数据库将包含在您的程序SQLite中,以完成教程
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?
这可能会帮助你找到你错过的东西。我假设由于您得到了SQLITE_ERROR,您已经正确地包含了libsqlite3.0.dylib。您确定您的数据库文件是有效的并且创建正确吗?