Updates trash database

When I make any changes in SQLPro for SQLight with a iOS Core Data SQLDatabase it seems to trash the database such that is will no longer run in my App.  I have delete it and let my core data stack recreate it.

The error in the log states: "NSSQLiteErrorDomain=11" and "SQLite error code:11, database disk image is malformed'" upon launching the App  after making a change inside SQLPro for SQLight

 What can be done to fix this?

6replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi. When you save and close the database with SQLPro, are you able to reopen it via SQLPro? Are you able to upload the files for the trashed database?

    Like
  • Hi Kyle,

    No after making a change to a field of type string (although any change seems to trigger this issue including setting up foreign keys) in SQLPro, closing and attempting to re-open it I receive and error message inside SQLPro too.   See attached image.  I have also attached the corrupt database and the shm and wal associated files.

    Like
    • Rob what version of SQLPro for SQLite are you using? Could you possibly post a screenshot from the 'About' dialog? Also is it from the App Store, or downloaded from the website? Thanks!

      Like
  • Attached is the screen shot.  I purchased SQLPro for SQLite from the Apple App Store for Mac.  The version is 2019.07.29

    Like
    • Rob thanks -- a few more questions:

       

      1. did you say the database you attached was one that you are unable to open? I was able to download + extract the files and open + view data with no issues.

      2. 'after making a change to a field of type string' - To confirm, you changed a cells value and that's when you see the issue?

      3. If you open the database in SQLPro for SQLite, make your change, close the file and reopen (without doing anything in Xcode), do you still get the error?

      Like
  • 1. Yes, the one I attached would produce the error in my initial screen shot of SQLPro

    2. I did, yes.  I changed a cell's value quit and re-opened SQLPro without doing anything else; including doing anything in Xcode (which was open but not running the simulator at the time.)

     

    I just ran another test with the latest Xcode 11 beta 7 and will include the results.

    Step 1 I open the file in SQLPro and edit the first record "Soda"

    Step 2 I save and close SQLPro

    Step 3 when I reopen the same database the records have been trashed somehow

    Like
Like Follow
  • 6 mths agoLast active
  • 6Replies
  • 10Views
  • 2 Following