Hello.

As I wrote earlier, in my application a user can open a database or create a new one, and then perform some tasks, the results of which are stored in the said database.

However, a strange thing happens: when the user _creates_ a database, everything is stored as hoped. But when the user _opens_ an existing database, nothing is stored in it, and a new file gets created, which name coincides with the name of the database the user opened with "- journal" in the extension. (I did read about that on the sqlite3 site, but it didn't seem to help).

The most puzzling thing about this is that when a database gets created, it is first created with a different name (from the one the user wants it to have), then my app, specifically, a class called DatabaseCreator, creates the necessary tables, populates them with initial data and closes the database. After that that, if a database with the name specified by the user for the new one already exists, it is moved to trash, and the newly created db with the temporary name is renamed to the name given by the user. And after that the class called DatabaseManager, which is a singleton, opens that database the same way it would if the user wanted to open a pre-existing database.

I am continuing my search for the possible reason for such a strange behavour, but i would be very grateful for any thoughts in that regard.

Thank you in advance.
Timofey.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to