Friday, July 8, 2011

Virus - fromat USB drive

If right click for format is not working.You can format it through DOS prompt.

just follow these steps:-

1. click on start

2..click on run

3. type cmd nad press enter

4.format i and press enter(Here i is the drive name ex:-if you want to format the drive d then you should've to type format d at command prompt.)

Virus - Disable Autorun on Your Pen Drive:

  • Open to Start >> Run and type “gpedit.msc” (without quotes) and press enter. This will open Group policy editor.
  • Browse to Administrative templates >> System >> double click on Turn off Autoplay click on Enabled and Under Settings >> Select All Drives in the drop down and click OK (as shown in the image below)

Monday, July 4, 2011

Table Layouts vs. Div Layouts:

http://coding.smashingmagazine.com/2009/04/08/from-table-hell-to-div-hell/

Saturday, July 2, 2011

How can I truncate the table which have foreign key

You can drop the Foreign Key before you do theTRUNCATE and add it back to the table after you are done. By the way, the TRUNCATE action is logged but it is just not the same way as the DELETE action. You can roll back a truncate in a transaction with the page logging.
Here is a simple sample for the question:
--Drop the foreign key
ALTER TABLE dbo.CategoryTable1Sub DROP CONSTRAINT FK_CategoryID
GO
truncate table dbo.CategoryTable1
truncate table dbo.CategoryTable1Sub GO
--Add Foreign key back
ALTER TABLE dbo.CategoryTable1Sub ADD CONSTRAINT
FK_CategoryID FOREIGN KEY
( CatID )
REFERENCES dbo.CategoryTable1 ( Category_ID )
GO