I was wondering if I need to consider (be aware of) any extra items in the following situation:
I am going to be modifying an existing C#.net 2008 desktop application. Basically, the production database will be changing drastically by this fall. Thus I basically will be replacing the 'old'database with the new database.
The application was origianlly written using 'drop' and 'drag' the database items on to the Visual Studion.net 2008 porfessional ide.
Thus, can I replace the 'old' database tables, and sql without any things to be concerned with? (The existing application does not use 'stored procedures.)
Sam HobbsPosted Jun 20, 2011, 1:37 AM
You also don't specify what you are using to access the database. That affects the answer.
Oh, now I see. You are saying that the application was designed by dragging and dropping. At first I thought you were saying that the user drags and drops to VS, which does not make sense. I assume that the database items were dropped onto the database designer.
So what kind of object is it that is created in the database designer? Is it a TableAdapter or a DataTable or an Entity or something else?
Hopefully it won't be too much work. I will assume that the database items are TableAdapters. Two things you should analyze is if the TableAdapters are created with the default names that VS generates when the TableAdapter is created. The other thing is the functions for each TableAdapter shown at the bottom of the box for each TableAdapter. I think that by default they are named Fill and GetData. If they are not called that or if there are more than those two then you will need to know the names and such from the old version for the new version. There are other details such as whether the TableAdapters have code generated for direct access to the database.
Something else that is critical is the differences between the old and new databases. Each field that is not in the new database that is included in a TableAdapter will of course require modification. The same for fields renamed and for fields whose data type (Text or integer or whatever) has changed.
A relatively simple thing you can do is to make a copy of the application then go to the Solution Explorer and delete all the datasources from the test application. Alternatively you can delete them from the Database Designer. Then re-create the datasources using the new database.
There might be a utility that will make that easier to do but I am not aware what.