Monday, May 31, 2010

[MSSQL] Enabling Agent XPs

To enable the Maintenance Plans in MSSQL 2005

sp_configure
'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure
'Agent XPs', 1;
GO
RECONFIGURE
GO

Thursday, May 6, 2010

[MSSQL] Backup Using Query

BACKUP DATABASE
TO DISK=N'D:\\.zip'
WITH INIT, NOUNLOAD,NAME=N'
',NOSKIP,STATS=10,NOFORMAT

Zip extension is not really a zip file but to be allowed downloaded through HTTP.

Thursday, March 25, 2010

[MSSQL] Run Procedure With Select

To run stored procedure using select, but the parameter is compulsory.

SELECT PROCEDURE_NAME(PARAM1,PARAMx)

Wednesday, March 24, 2010

[MSSQL] Alter Table

ALTER TABLE table

ADD column_name
data_type [ ( size ) ]
[ DEFAULT value ]
[ NULL | NOT NULL ]
[ PRIMARY KEY | UNIQUE ]
[ CONSTRAINT constraint_name ]

ALTER COLUMN column_name
data_type [ ( size ) ]
[ ( precision [ , scale ] ) ]
[ NULL | NOT NULL ]

DROP COLUMN column_name | [ CONSTRAINT ] constraint_name

Friday, March 12, 2010

[MSSQL] Enable sa Login

alter login sa enable;
go
alter login sa with password = ''

[IIS] HTTP Error 404 in IIS 6.0

Error message 1
HTTP Error 404 - File Not Found

Error message 2
HTTP Error 404- File or Directory not found

Resolution:
1. Open IIS Manager, expand the master server node (that is, the Servername node), and then select the Web service extensions node.
2. In the right pane of IIS Manager, right-click the extension that you want to enable. In this example, this is Active Server Pages.
3. Click to select the Allow check box.

Please refer to http://support.microsoft.com/kb/315122

Tuesday, February 16, 2010

[.Net] Auto hide radio button in Grid RowDataBound event

If e.Row.Cells(7).Text = " " Then
rbl.Visible = False
Else
rbl.Visible = True
End If