I'm in the midst of writing a script that is updating the collation of all varchar columns for every table in my database (Sql Server 2008). I need a way to collect a list of each constraint in a table so that I can drop it, alter the columns the constraint affects, and then re-add the constraint. I know that I am able to grab UK constraints via indexes but what about Default constraints?
Update: I would also like to add that I am trying to do this by looping through the schema. I know I can run a SQL String against the database to collect this information but is there a way to get this information via the GetSchema() or ReportSchema() method?
Update: I would also consider using SMO as a way to accomplish this.