Skip to content

Month: February 2014

SQL Changing Schema Name

Changing it one by one use the following.

ALTER SCHEMA dbo TRANSFER someschema.someobject;

Changing all stored procedures.

select 'ALTER SCHEMA dbo TRANSFER ' + SPECIFIC_SCHEMA + '.' + ROUTINE_NAME from INFORMATION_SCHEMA.ROUTINES  
where ROUTINE_TYPE='procedure'

 

You already voted!
Leave a Comment

Change HTMLEncode In An Autogenerated Gridview

The only way I found to change the HtmlEncode property on a bound column when auto-generating the grid-view.

protected void grFeedHistoryView_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            BoundField field = (BoundField)((DataControlFieldCell)e.Row.Cells[2]).ContainingField;
            field.HtmlEncode = false;
        }

 

You already voted!
Leave a Comment