tags:

views:

32

answers:

1

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?

A: 

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?

mjdth
Yes... the database was working before, and suddenly stopped working... I've checked the original database that I'm dropping in the Resources folder, and it's 31M. But, when I do a build, XCode creates a database by the same name in the application folder that it's building, but is not copying the contents. The file is there, but it's got 0k bytes.Any ideas?
Incognitii