Suvendu's profileSuvendu's spacePhotosBlogListsMore Tools Help

Suvendu Patra

No list items have been added yet.

Suvendu's space

June 08

Update Trigger

Lets assume if you want to check whether any of the columns 2,3,4 or all the columns have been updated or not. Then use the following IF condition

IF (COLUMNS_UPDATED() & 14) > 0

14 is the bitmask for all three columns.

for col 2, (this is col id you can see in syscolumns table) bitmask is power(2,(2-1))=2

for col 3, bitmask is power(2,(3-1))=4

for col 4, bitmask is power(2,(4-1))=8

In above ex, since your checking all there columns bitmask is the sum of all. That comes to 14.
June 07

FreeSpace Alert in SQL Server 2000/2005

Create a vbs file in C; Drive named as disk.vbs
content are given below


Set DiskSet = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("select FreeSpace,Size,Name from Win32_LogicalDisk where DriveType=3")
for each Disk in DiskSet
If (Disk.FreeSpace/Disk.Size) < 0.30 Then 
WScript.Echo "Drive " + Disk.Name + " is low on space."
End If
Next

Then Create a Job which will run on your requirement to check sapce and in Step 1 put the below code.

create table ##diskspace (details varchar(1000))
insert into ##diskspace
exec xp_cmdshell 'cscript c:\disk.vbs'

if (select count(*) from ##diskspace where cmd like '%low on space%') > 0
begin
declare @sql varchar(200)
SELECT @sql ='select * from ##diskspace where  cmd like ''%low on space%'''
PRINT @SQL
exec master.dbo.xp_sendmail @recipients='Your ID', 
   @query = @sql,
   @subject = 'Disk Space Full'
end
drop table ##DiskSpace
March 12

Useful links for CSS

 

I just started to create my CSS file for my project, and just want to check out if there are any recommended ways of doing this right. I just did a simple search in code project site, and found a lot of related articles which are useful. (Well, more to read now....)

I'll add more to the list when I've found more information here.

1. Internet Explorer & CSS issues

2. Ten ways to speed up the download time of your web pages (some key points here, a must read article.)

3.  Ten CSS tricks you may not know (There are some tricks here that you shouldn't miss too)

4. CSS Help Pile - A huge pile of CSS-related tips, tricks & resources.

5. 53 CSS-Techniques You Couldn't Live Without (Here, you can learn the specific technique that you want to use in your web site. Another Must Read article.)

6. Layout Gala: a collection of 40 CSS layouts - Here you'll get some reference CSS layout sites.  

7. MaxDesign - Sample CSS Page Layouts (with step by step layout tutorial too)

8. CSSplay - There are some demos, menus, layouts, boxes examples.

February 25

Internet Explorer 8 soon available?

 

The next release of IE will be called — wait for it — “Internet Explorer 8.”

That’s it. More info to come — at least by Mix ‘08. Which is in March 2008. Sigh.

See some Screenshots

ie84

ie8

ie82

ie83

December 12

bypass the Open/Save/Cancel dialog while file download

If you want to bypass the Open/Save/Cancel dialog you just need to write below code

Response.AddHeader("Content-Disposition", "inline; filename=" + file.Name);

 
Photo 1 of 8
More albums (1)
No list items have been added yet.