Jwalin Khatri

Archive for February 2009

Create Unlimited Subdomains with HTTP Modules

Posted by: jwalin on: February 27, 2009

http://codebetter.com/blogs/brendan.tompkins/archive/2006/06/27/146875.aspx
http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/

Catch the Error/Exception in SQL server 2000

Posted by: jwalin on: February 27, 2009

Following store procedure do the 3 things 
1]. Insert record into the Table
2]. Writing into the Text file
3]. Send email  

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
CREATE procedure [dbo].[spErrorHandling] 
(
@Error_Number int,
@Error_Procedure varchar(200),
@LineNumber varchar(20)
)
AS 
– Declaration statements
DECLARE @Error_Message varchar(4000)
DECLARE @Error_Severity int
DECLARE @Error_State int
DECLARE @Error_Line int
DECLARE @UserName varchar(200)
DECLARE @HostName varchar(200)
DECLARE @Time_Stamp datetime
/*******************************************
READ THE DESCRIPTION FROM LOG
******************************************/
declare @ErrorNo int, 
     @ErrorDesc varchar(4000) 
SET @ErrorNo [...]

Create alias using Sql Server Client Network Utility

Posted by: jwalin on: February 20, 2009

SQL Server Client Network Utility
If you haven’t installed the SQL Server 2005/2008 client tools, you can still create an alias using the SQL Server Client Network Utility. This has come installed automatically on every operating system from Windows 2000 on. To bring up the utility, click on Start, then Run, and run cliconfg.exe. To [...]

Create Serial Number Column using SQL Server

Posted by: jwalin on: February 18, 2009

this is only for SQL 2005
SELECT CategoryID, CategoryName
    FROM (SELECT Row_Number() OVER(ORDER BY CategoryName DESC) as RowNum, 
                            CategoryID, CategoryName FROM dbo.Categories) Cat
OR
SELECT ROW_NUMBER()  OVER (ORDER BY  Field1) As SrNo, Field1,  Field2 FROM < Table>
if you are using SQL 2000 
 
By using the % (modulo) operator we get rows with the categoryid is odd. This does not perfectly give you everyother row since we could have a missing [...]

Missing SQL Server Business Intelligence Development Studio

Posted by: jwalin on: February 18, 2009

In my machine, I missed “SQL Server Business Intelligence Development Studio”. So I want to reinstall it. 
I missed the SQL Server Business Intelligence Development Studio as I installed the SQL server before Visual Studio installed…  
If you don’t find any entry for Visual Studio go to the location for SQL Server setup and run
<CD/DVD Drive>\Tools\Setup\vs_setup.exe. This will [...]

How to Debugging Store Procedure

Posted by: jwalin on: February 13, 2009

There is two ways to debug the Store procedure. 
Option 1: Debug a stored procedure in standalone mode

Open Server Explorer.
Under the Servers node in Server Explorer, expand the SQL Server machine name, expand the SQL Servers node, expand the SQL Server instance, expand the Northwind database node, and then expand the stored [...]

ASP.Net Page Life Cycle

Posted by: jwalin on: February 13, 2009

IETester Tool

Posted by: jwalin on: February 13, 2009

Today my client complening that site is working different in IE 6 and IE 7. Since, I am working on IE 7 and didn’t want to go throught the hassle of trying to install IE6 or install Virtual machine. I am trying to look around for something that could help me out.
I found IETester. It’s [...]

Data type: datetime vs. smalldatetime
Both datetime and smalldatetime represent the date and the time of day.
Choose the type carefully based on their range: 

Passing a Table to a Stored Procedure

Posted by: jwalin on: February 13, 2009

Here is the example of How to pass a table to store procedure
http://www.sqlservercentral.com/articles/News/3182/


Blog Stats

  • 15,017 hits

  • jwalin: Follow the following steps 1]. open you Page in NOTEPAD. 2]. find the tag 3]. Replace the "body" like body oncontextmenu=”return false;" 4]. Sav
  • cytocine: Halu , how to put that , i mean where to put the part ?? i really dont know i hope you can help me out thanks..
  • elmerdolor: Halu , how to put that , i mean where to put the part ?? i really dont know i hope you can help me out thanks..