views:

50

answers:

1

This is the situation. I have a windows form app that uses an access database to store the information. Everything has been going good. Now I am going to release a new version with an updated access file (2 new tables, 1 old table with new column). But the people that have been using the app I don't want them to loose their information when they upgrade to the new version.

How is the best way to handle that situation?

I am using Visual Studio 2008 and vb.net to write the windows form app.

Thanks

+4  A: 

The way I see it is you have 2 options

Modify the old DB on each user's computer through code to include the new columns etc

Copy the new DB down on install as a different name then using code again copy over the data from the old one before deleting it and renaming your new one to what it should be called

Here is a link to help with if you go for option 1

http://allenbrowne.com/func-DAO.html

Kevin Ross
+1 Go with the code route to modify tables.
Jeff O
I'd go with the other suggestion as it requires a lot less code and some pretty simple SQL. Jet/ACE DDL is not complete and so you'd have to use DAO to be sure you're getting all the properties set correctly. But importing their data into an empty shell template avoids all of that, and with just a few SQL statements.
David-W-Fenton