search

Google
 

Tuesday, February 5, 2008

How to change Default DataBase in SQL Server 2005

ALTER LOGIN [Login_Name] With default_database = [Database_Name]

Example:-

alter login sa with default_database = ourspace

How to Alter a column DataType in SQL Server 2005

USING [Database_Name]
ALTER TABLE [Table_Name]
ALTER COLUMN [ Field_Name] New_Datatype

Example :-

ALTER TABLE myTable
ALTER COLUMN fieldname nvarchar(255)

Adding a column to a existing Table in SQL Server 2005

USE [Database_Name]
ALTER TABLE [Table_Name]
ADD [Column_Name] Datatype null

Example:-

USE ourspace
ALTER TABLE items ADD Brand varchar(100) null

Friday, February 1, 2008

How to disable Back button of Internet Explorer

There is no direct way to disable the back button so that it is greyed-out and user cannot click on it.

However, there are some tricks using javascript which might be able to give you the results that we need, using javascripts window.history function with a session variable and automatically logging off and redirecting to the required page if user hits the back button.

javascript code

window.history.forward(1);