Auto refresh of table adpaters whenever column name in database changes.

vinitfichadia

Member
Joined
Jun 26, 2008
Messages
11
Programming Experience
1-3
Hi all,

i m using strongly typed tableadapters, now whenever i chang a column name in database, and if the application is running it throws "Failed to enable constraints error" until i change the column name in my table adapter, now i need to do this everytime i change a column name in database, is there any solution to refresh the tableadapter automatically when every we change column name in database.

please help!

Thanks Vinit
 
Stop changing column names in your database. Think of a suitable name in the first place, then quit messing around with it or ALL your apps will break.
 
I have found that in some cases in is not possible to refrain from changing the database columns by adding deleting or modifying columns in the database. You will often get managers or clients requesting new functionality that requires changes to the database.

Regards

Scott
 
I have found that in some cases in is not possible to refrain from changing the database columns by adding deleting or modifying columns in the database. You will often get managers or clients requesting new functionality that requires changes to the database.
Though "new functionality" usually results in client side code changes too. Except in cases where stored procedures are used for everything and the existing data being passed is sufficient, you WILL have to change the client to provide new functionality, and if you have to rename columns, then you will have to link that in too. Basically, if youre changing column names every day, stop it.. (Weeks of coding can save you hours of planning)
If your product is growing older and new columns are needed for new functionality then updating the data layer is necessary and.. er.. "stop complaining about it and just get it done" would be the advice :)
 
In my experience, it does not happen often, as good database design in the initial stages of a project can make or break it, but it is inevitable that occasionally changes will be required.

If major changes are required half way through the projects life then one needs to question the original design.

Regards

Scott
 
Back
Top