• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problem: sqlite3 and .sqlite-journal files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem: sqlite3 and .sqlite-journal files


  • Subject: Problem: sqlite3 and .sqlite-journal files
  • From: Тимофей Даньшин <email@hidden>
  • Date: Fri, 17 Apr 2009 23:47:24 +0400

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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Problem: sqlite3 and .sqlite-journal files
      • From: Chris Hanson <email@hidden>
  • Prev by Date: How does a new app learn about its menu?
  • Next by Date: SQLite 3 crash report - debugging help needed
  • Previous by thread: Re: How does a new app learn about its menu?
  • Next by thread: Re: Problem: sqlite3 and .sqlite-journal files
  • Index(es):
    • Date
    • Thread