SQL Server - Topluca Tablo Silmek


DECLARE @cmd varchar(4000)

DECLARE cmds CURSOR FOR

SELECT 'drop table [' + Table_Name + ']'

FROM INFORMATION_SCHEMA.TABLES

WHERE Table_Name LIKE 'STF%'


OPEN cmds

WHILE 1 = 1

BEGIN

    FETCH cmds INTO @cmd

    IF @@fetch_status != 0 BREAK

    EXEC(@cmd)

END

CLOSE cmds;

DEALLOCATE cmds

Gridview Kolonu Yazmaya Karşı Kilitlemek

aspxGridView 'da bir kolonu sadece update yapılırken kilitlemek istersek ;


protected void grid_Company_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)

        {

            if (e.Column.FieldName == "Code")

            {

                e.Editor.ReadOnly = !((ASPxGridView)sender).IsNewRowEditing; ;

            }

        }