0

Here's my case

I've to replace my car company database file with a new one because of some structural changes.

The newer car company table (in the database) has some addition companies compared with the old one.

car company
   ( id,
   companyname,
   address,
   phone,
   isUserFavorite,
   ... 
   )

I want to backup the user favorite field from old the database, which means I've to SELECT and UPDATE between 2 databases.

Also, i need to backup the history table, too. (SELECT and INSERT to newer one).

I think I've to ATTACH DATABASE, do my tasks, and then DETACH DATABASES when i'm done, right ?

But I don't know how to do that in particular. Do I've to write multiple methods to do these tasks or how can I execute multiple sqlite's query in one method ?

Thanks

Pham Hoan
  • 2,107
  • 2
  • 20
  • 34
  • I don't have the code at hand, but it's all out there if you search for it. – Hot Licks Feb 11 '14 at 02:29
  • (It's not clear: Are you changing the DB schema, or simply adding records. If adding records, just add them. Otherwise you can fairly easily copy between old and new DB, but, as I said, I don't have the example in front of me.) – Hot Licks Feb 11 '14 at 02:33

0 Answers0