Eddie gave Tony a sqlite db question

As a learning exercise in creating my own sqlite db app, I duplicated the EddiesElectronic project and the .sqlite database but renamed the db to TonysElectronics etc. Thought this would be a ‘simple’ way to see where things might go differently, but using a ‘control’ project.

I made the appropriate changes in the duplicated project to account for the db name change. Nothing else was changed!

Then I ran the program which promptly gave errors in the App.open event:
Dim dbFile As FolderItem
dbFile = SpecialFolder.GetResource(“TonysElectronics.sqlite”) << error thrown here

Part of my confusion is why doesn’t the Eddies project throw the exception AND how do I fix/address it so my ‘modified’ project runs?

All pointers welcome.

Tony

You probably just forgot to update the CopyDB build step with your new filename (in the navigator under Build Settings…iOS). Without it knowing what to copy, it won’t exist :slight_smile:

That was it. Simple once known.

Using Xojo 3.1; Mac OSX 10.10.1

Continuing on with my learning exercise I ran my cloned version of Eddies’ Electronics in the Simulator.

I took the first name (Abdul) and changed the State from Colorado to Florida; clicked on ‘Done’. The change seemed to be applied.
Then closed the simulator. Re ran the project and the changes HAD NOT remained. I then built the app and placed on my device (iPad2).

Repeated the process of changing Colorado to Florida, and again the change seemed to take. However, this time (on the device)
when I clicked ‘Done’ the app just quit. Huh?

Re ran the app on device and changes did not take.

What do I need to look for?

TIA, Tony

Edit: Ran all the identical steps on the original Eddies and I see the same behavior described above.

The Eddie’s app re-creates a copy of the database every time it starts, and doesn’t store any changes.

But it does not work on the device (iPad) where it should update.
see Re ran the app on device and changes did not take. in my original post. AND, on the device clicking the ‘Done’ button immediately quits the app.

I don’t have a Mac or iPad, so I can’t comment on the ‘Done’ button crash.
I’ll expand my response.

The Eddie’s app makes a copy of the database every time it starts,
any data changes happen only on the copy. It never changes the actual on-disk database.

Search for ‘SetupNewDatabase’