I want to lookup the default value of a column in my SQL2005 database. I only have the SQL server connection string, so I can only use the Sql library namespace (can't use the Oledb GetSchema stuff). I know there is a GetSchema()... but how do I use it to get a column schema, and thus the default value? I can't fillSchema on a datatable, because that doesn't appear to fill the default value property. I can use "exec sp_columns 'ADDRESS_MASTER'" and that returns default values, but they are not in a clean format... for example, one of my text column default comes back as "(N'test)".
I also want to get column size... sp_columns seems to give me everything... but I don't know how to decode the default values in all cases?