Sunday, February 19, 2012

z-index problem in IE7

Add the following code,  so menu will be show all over the object.
$(function() {
    var zIndexNumber = 1000;
    $('div').each(function() {
        $(this).css('zIndex', zIndexNumber);
        zIndexNumber -= 10;
    });
    });

From http://www.vancelucas.com/blog/fixing-ie7-z-index-issues-with-jquery/

Sunday, February 5, 2012

Delete all tables including foreign key

Deleting all table
exec sp_MSforeachtable "DROP TABLE ? PRINT '? dropped' "

If cannot delete because of foreign key
1. run

SELECT *
FROM sys.foreign_keys
WHERE referenced_object_id = object_id('user')

2. run and copy the result
SELECT
    'ALTER TABLE ' + OBJECT_NAME(parent_object_id) +
    ' DROP CONSTRAINT ' + name
FROM sys.foreign_keys
WHERE referenced_object_id = object_id('user')

3. run copy lines