<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7925522</id><updated>2012-01-30T15:48:01.454-08:00</updated><category term='VS 2008'/><category term='Plugins'/><category term='jQuery'/><category term='MVC'/><category term='Performance'/><category term='SQL Server 2008'/><category term='Thickbox'/><category term='Framework 4.0'/><category term='Stored Procedure'/><category term='Outlook'/><category term='Office'/><category term='PLINQ'/><category term='Selenium'/><category term='Deployment'/><category term='.Net'/><category term='SQL Server'/><category term='VS 2010'/><category term='AJAX'/><category term='XML'/><category term='SQL Server 2012'/><category term='Dotnet'/><category term='C# 3.0'/><category term='compression'/><category term='SCRUM'/><category term='Agile'/><category term='Framework'/><category term='SSRS'/><category term='Tools'/><category term='Debugging'/><category term='asp.net 2.0'/><category term='C#.Net'/><category term='Azure Services Platform'/><category term='viewstate'/><category term='its me'/><category term='ASP.Net'/><category term='Tips and Tricks'/><category term='Automation'/><category term='Silverlight'/><category term='C# 4.0'/><title type='text'>The Code Captain</title><subtitle type='html'>C#.Net, VB.Net, ASP.Net, SQL Server, funny things and everything</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>58</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7925522.post-843543824690976642</id><published>2011-12-05T22:45:00.000-08:00</published><updated>2011-12-06T08:35:43.437-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2012'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Recovery Models in SQL Server</title><content type='html'>Here we are going to discuss about database recovery model in SQL Server.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Recovery Models:&lt;/span&gt;&lt;br /&gt;1. Simple&lt;br /&gt;2. Bulk Logged&lt;br /&gt;3. Full&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Simple Recovery Model:&lt;/span&gt;&lt;br /&gt;a)All the operations are not logged in Log file.&lt;br /&gt;b)Log file size won't grow much. &lt;br /&gt;c)Suitable for LOCAL and STAGE Environment.&lt;br /&gt;d)Can't recover the database to certain point in time state.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Bulk Logged Recovery Model:&lt;/span&gt;&lt;br /&gt;a)Only minimal information logged in log file during BULK operation. So, its also called as "Minimal Logging"&lt;br /&gt;b)Log File won't grow much during bulk operation.&lt;br /&gt;c)Suitable during bulk operation, migration.&lt;br /&gt;d)Can't recover the bulk operation data.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Full Recovery Model:&lt;/span&gt;&lt;br /&gt;a)All the operation logged in log file.&lt;br /&gt;b)Log file size grow rapidly depends upon transactions.&lt;br /&gt;c)Suitable for PRODUCTION environment.&lt;br /&gt;c)Can recover the database to certain point in time (if we followed proper backup plan).&lt;br /&gt;&lt;br /&gt;Here is script to switch to different recovery model.&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; ALTER DATABASE testdb SET RECOVERY SIMPLE  &lt;br /&gt; GO  &lt;br /&gt; ALTER DATABASE testdb SET RECOVERY BULK_LOGGED  &lt;br /&gt; GO  &lt;br /&gt; ALTER DATABASE testdb SET RECOVERY FULL  &lt;br /&gt; GO  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-843543824690976642?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/843543824690976642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=843543824690976642' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/843543824690976642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/843543824690976642'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2011/12/recovery-models-in-sql-server.html' title='Recovery Models in SQL Server'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-8587956194640498366</id><published>2011-12-01T09:19:00.000-08:00</published><updated>2011-12-01T09:39:34.026-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Rebuilding and Reorganizing Indexes based on Fragmentation in SQL Server</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Why we have to Rebuild and Reorganize the indexes?&lt;/span&gt;&lt;br /&gt;As the time passes, data pages are scattered/fragmented and not in order due to insert, update and delete operation. So, its better the rebuild / reorganize the indexes to improve the query performance. Otherwise, query response would be slow because its would take more time to collect the data's which is scattered.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Rebuilding Indexes:&lt;/span&gt;&lt;br /&gt;1. Its nothing but dropping and creating the indexes.&lt;br /&gt;2. More CPU resources need.&lt;br /&gt;3. Deadlock would happen while rebuilding the indexes.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Reorganizing Indexes:&lt;/span&gt;&lt;br /&gt;1. Rearranging the leaf pages in correct order.&lt;br /&gt;2. Less CPU resources need.&lt;br /&gt;3. Deadlock possibility is very less.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When to use REORGANIZE and REBUILD?&lt;/span&gt;&lt;br /&gt;Generally if fragmentation percentage for each index is from 5 - 30 percent, reorganize the index. if fragmentation percentage is more than 30 percent, its better to REBUILD the index.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;SQL Script to REORGANIZE and REBUILD each index in each table:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; DECLARE @ReOrgLowPercent INT,  &lt;br /&gt;   @ReOrgHighPercent INT,  &lt;br /&gt;   @TableName VARCHAR(200)  &lt;br /&gt; SET @ReOrgLowPercent = 5  &lt;br /&gt; SET @ReOrgHighPercent = 30  &lt;br /&gt; DECLARE @IndexTable TABLE ( AlterStatement VARCHAR(4000) )  &lt;br /&gt; DECLARE C CURSOR  &lt;br /&gt;   FOR SELECT name  &lt;br /&gt;     FROM  sys.tables  &lt;br /&gt; OPEN C  &lt;br /&gt; FETCH NEXT FROM C INTO @TableName  &lt;br /&gt; WHILE ( @@FETCH_STATUS = 0 )  &lt;br /&gt;   BEGIN  &lt;br /&gt;     --PRINT @TableName  &lt;br /&gt;     INSERT INTO @IndexTable ( AlterStatement )  &lt;br /&gt;         SELECT CASE when avg_fragmentation_in_percent between @ReOrgLowPercent and @ReOrgHighPercent  &lt;br /&gt;                then 'ALTER INDEX ' + i.name + ' ON ' + t.name  &lt;br /&gt;                  + ' REORGANIZE;'  &lt;br /&gt;                when avg_fragmentation_in_percent &amp;gt; @ReOrgHighPercent  &lt;br /&gt;                then 'ALTER INDEX ' + i.name + ' ON ' + t.name  &lt;br /&gt;                  + ' REBUILD WITH(ONLINE=ON);' --- enterpise version obly  &lt;br /&gt;             END  &lt;br /&gt;         FROM  sys.dm_db_index_physical_stats(DB_ID(),  &lt;br /&gt;                             OBJECT_ID(@TableName),  &lt;br /&gt;                             NULL, NULL, NULL) AS a  &lt;br /&gt;             JOIN sys.indexes AS i ON a.object_id = i.object_id  &lt;br /&gt;                          AND a.index_id = i.index_id  &lt;br /&gt;             JOIN sys.tables AS t ON t.object_id = i.object_id  &lt;br /&gt;     FETCH NEXT FROM C INTO @TableName  &lt;br /&gt;   END  &lt;br /&gt; CLOSE C  &lt;br /&gt; DEALLOCATE C  &lt;br /&gt; SELECT AlterStatement  &lt;br /&gt; FROM  @IndexTable  &lt;br /&gt; WHERE  &lt;br /&gt;      AlterStatement IS NOT NULL  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-8587956194640498366?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/8587956194640498366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=8587956194640498366' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/8587956194640498366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/8587956194640498366'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2011/12/rebuilding-and-reorganizing-indexes.html' title='Rebuilding and Reorganizing Indexes based on Fragmentation in SQL Server'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-4800406452593869632</id><published>2011-11-25T02:21:00.000-08:00</published><updated>2011-11-25T02:44:51.601-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2012'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>SQL Server 2012 - Improved Version of EXECUTE keyword</title><content type='html'>In Previous version of SQL Server 2005/2008, if you execute the SELECT Stored Procedure using EXECUTE keyword, it will return all the records as it is. if you want to edit the column name and data type of result set, you have to modify the stored procedure respectively. &lt;br /&gt;&lt;br /&gt;But in SQL Server 2012, improved version of EXECUTE keyword allows to modify the result set with changing the column name and data type without modifying the stored procedure.&lt;br /&gt;&lt;br /&gt;To explore this features, execute the following script to create a table, insert the record and creating the stored procedure.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; CREATE TABLE Customers  &lt;br /&gt; (  &lt;br /&gt;      ID INT IDENTITY(1,1),  &lt;br /&gt;      FirstName VARCHAR(50),  &lt;br /&gt;      LastName VARCHAR(50),  &lt;br /&gt;      DOB DATE  &lt;br /&gt; )  &lt;br /&gt; GO  &lt;br /&gt; INSERT INTO Customers (FirstName, LastName, DOB)  &lt;br /&gt; SELECT 'Ayyanar', 'Jayabalan', '08/12/1982'  &lt;br /&gt; UNION ALL  &lt;br /&gt; SELECT 'Greg', 'Damico', '08/12/1970'  &lt;br /&gt; GO  &lt;br /&gt; CREATE PROCEDURE Customers_SelectAll  &lt;br /&gt; AS  &lt;br /&gt; BEGIN  &lt;br /&gt;      SELECT  &lt;br /&gt;           ID,  &lt;br /&gt;           FirstName,  &lt;br /&gt;           Lastname,  &lt;br /&gt;           DOB  &lt;br /&gt;      FROM dbo.Customers  &lt;br /&gt; END  &lt;br /&gt; GO  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;In SQL Server 2005/2008:&lt;/span&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; -- SQL 2005/2008  &lt;br /&gt; EXECUTE Customers_SelectAll  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;RESULT:&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-C2d5wPhBdtU/Ts9tY0Iw38I/AAAAAAAACX0/WI4yAOQHyW4/s1600/Screenshot%2B-%2B11_25_2011%2B%252C%2B3_50_46%2BPM.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 254px; height: 67px;" src="http://1.bp.blogspot.com/-C2d5wPhBdtU/Ts9tY0Iw38I/AAAAAAAACX0/WI4yAOQHyW4/s400/Screenshot%2B-%2B11_25_2011%2B%252C%2B3_50_46%2BPM.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5678877928217173954" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;In SQL Server 2012:&lt;/span&gt;&lt;br /&gt;Here i am changing the column "id" into "CustomerId" and also changing the data type of firstname from VARCHAR(50) to VARCHAR(4). Since i reduced the length of FirstName to 4, it shows truncated firstname value.&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; -- SQL 2012  &lt;br /&gt; EXEC Customers_SelectAll  &lt;br /&gt; WITH RESULT SETS  &lt;br /&gt; (  &lt;br /&gt; (  &lt;br /&gt;      CustomerID SMALLINT,  &lt;br /&gt;      FirstName VARCHAR(4),  &lt;br /&gt;      Lastname VARCHAR(20),  &lt;br /&gt;      DateOfBirth DATE  &lt;br /&gt; )  &lt;br /&gt; );  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;RESULT:&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/-fZVlz2aS144/Ts9tSuSc4LI/AAAAAAAACXk/ATgar-UIy1g/s1600/Screenshot%2B-%2B11_25_2011%2B%252C%2B3_51_09%2BPM.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 308px; height: 63px;" src="http://4.bp.blogspot.com/-fZVlz2aS144/Ts9tSuSc4LI/AAAAAAAACXk/ATgar-UIy1g/s400/Screenshot%2B-%2B11_25_2011%2B%252C%2B3_51_09%2BPM.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5678877823567978674" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-4800406452593869632?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/4800406452593869632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=4800406452593869632' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/4800406452593869632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/4800406452593869632'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2011/11/sql-server-2012-improved-version-of.html' title='SQL Server 2012 - Improved Version of EXECUTE keyword'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-C2d5wPhBdtU/Ts9tY0Iw38I/AAAAAAAACX0/WI4yAOQHyW4/s72-c/Screenshot%2B-%2B11_25_2011%2B%252C%2B3_50_46%2BPM.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-6651487851164290735</id><published>2011-11-25T01:39:00.000-08:00</published><updated>2011-11-25T01:53:53.651-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2012'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>SQL Server 2012 - Throwing Exception using THROW in TRY CATCH BLOCK instead of using RAISERROR</title><content type='html'>In SQL Server 2005/2008, if you want to throw an error again in catch block of TRY CATCH statement, you have to use RAISERROR with ERROR_MESSAGE(), ERROR_SEVERITY().&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;In SQL Server 2005/2008:&lt;/span&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; -- EXCEPTION HANDLING in SQL Server 2005/2008  &lt;br /&gt; BEGIN TRY  &lt;br /&gt;   DECLARE @VALUE INT  &lt;br /&gt;   SET @VALUE = 1 / 0  &lt;br /&gt; END TRY   &lt;br /&gt; BEGIN CATCH  &lt;br /&gt;   DECLARE @Message nvarchar(4000), @Severity int  &lt;br /&gt;   SELECT @Message = ERROR_MESSAGE(), @Severity = ERROR_SEVERITY()  &lt;br /&gt;   RAISERROR ( @Message, @Severity, 1 )  &lt;br /&gt; END CATCH  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;SQL Server 2012:&lt;/span&gt;&lt;br /&gt;Just, you can use &lt;span style="font-weight:bold;"&gt;THROW &lt;/span&gt;keyword to throw the complete error information.&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; -- EXCEPTION HANDLING using THROW in SQL Server 2012  &lt;br /&gt; BEGIN TRY  &lt;br /&gt;      DECLARE @VALUE INT  &lt;br /&gt;      SET @VALUE = 1/0  &lt;br /&gt; END TRY   &lt;br /&gt; BEGIN CATCH  &lt;br /&gt;      THROW  &lt;br /&gt; END CATCH  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;if you execute the above statement, you will receive an error like below.&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; Msg 8134, Level 16, State 1, Line 5  &lt;br /&gt; Divide by zero error encountered.  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-6651487851164290735?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/6651487851164290735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=6651487851164290735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/6651487851164290735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/6651487851164290735'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2011/11/sql-server-2012-throwing-exception.html' title='SQL Server 2012 - Throwing Exception using THROW in TRY CATCH BLOCK instead of using RAISERROR'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-2248414191662463544</id><published>2011-11-24T20:12:00.000-08:00</published><updated>2011-11-25T01:39:19.666-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2012'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Custom Paging in SQL Server 2012 - Using OFFSET</title><content type='html'>In SQL Server 2005/2008, if you have want to implement the custom paging for ASP.Net GridView or any other controls, you have use either COMMON TABLE EXPRESSIONS with ROW_NUMBER() or just ROW_NUMBER() keyword.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;CUSTOM PAGING IN SQL SERVER 2005/2008:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; -- CUSTOM PAGING IN SQL SERVER 2005   &lt;br /&gt; USE AdventureWorks  &lt;br /&gt; DECLARE @PageIndex SMALLINT, @PageSize SMALLINT, @StartRowId INT, @EndRowId INT  &lt;br /&gt; SET @PageIndex = 1  &lt;br /&gt; SET @PageSize = 10  &lt;br /&gt; SET @StartRowId = ( (@PageIndex - 1) * @PageSize) + 1  &lt;br /&gt; SET @EndRowId = (@StartRowId + @PageSize) - 1  &lt;br /&gt; SELECT      *  &lt;br /&gt; FROM (  &lt;br /&gt; SELECT ROW_NUMBER() OVER(ORDER BY EmployeeId) AS RowId, *  &lt;br /&gt; FROM HumanResources.Employee) AS TT  &lt;br /&gt; WHERE RowId &amp;gt;= @StartRowId and RowId &amp;lt;= @EndRowId  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;CUSTOM PAGING IN SQL SERVER 2012 using OFFSET:&lt;/span&gt;&lt;br /&gt;In SQL Server 2012, by using the OFFSET feature, we can implement the custom paging easily without having too many SQL statements.&lt;br /&gt;Just you have to specify starting row id and page size like below.&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; OFFSET &amp;lt;Offset&amp;gt; ROWS  &lt;br /&gt; FETCH NEXT &amp;lt;PageSize&amp;gt; ROWS ONLY;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here is the complete T-SQL statement for custom paging.&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; -- CUSTOM PAGING IN SQL SERVER 2012 RC0  &lt;br /&gt; DECLARE @PageIndex SMALLINT, @PageSize SMALLINT, @Offset INT  &lt;br /&gt; SET @PageIndex = 1  &lt;br /&gt; SET @PageSize = 10  &lt;br /&gt; SET @Offset = ( (@PageIndex - 1) * @PageSize)  &lt;br /&gt; SELECT      *  &lt;br /&gt; FROM HumanResources.Employee  &lt;br /&gt; ORDER BY EmployeeId  &lt;br /&gt; OFFSET @Offset ROWS  &lt;br /&gt; FETCH NEXT @PageSize ROWS ONLY;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-2248414191662463544?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/2248414191662463544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=2248414191662463544' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/2248414191662463544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/2248414191662463544'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2011/11/custom-paging-in-sql-server-2012-using.html' title='Custom Paging in SQL Server 2012 - Using OFFSET'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-2619610206285117880</id><published>2011-11-22T05:31:00.000-08:00</published><updated>2011-11-22T06:00:44.816-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2012'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>SQL Server 2012 Features - Sequence Number</title><content type='html'>Today,i have installed to explore the features of SQL Server 2012. First feature which i am going to discuss is "Sequence Number". You can generate sequence number like identity column. In Previous release, if you want to generate a sequence id before inserting into the table, you have to create a seperate physical table with identity column. Before inserting record into table, we have to insert a row in custom sequence table and get the latest value.&lt;br /&gt;&lt;br /&gt;But in SQL Server 2012, you no need to insert record in any physical custom table to retrieve the number in sequence. Just you have to create sequence object which binds to schema.&lt;br /&gt;&lt;br /&gt;Here are the steps to create Sequence object using SQL Server Management Studio.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;1. Create a New Sequence:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-4CJrtcRVDb0/TsunKQ5_4EI/AAAAAAAACXM/ZlyiNlKvnOA/s1600/Screenshot%2B-%2B11_22_2011%2B%252C%2B6_52_08%2BPM.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 313px; height: 400px;" src="http://2.bp.blogspot.com/-4CJrtcRVDb0/TsunKQ5_4EI/AAAAAAAACXM/ZlyiNlKvnOA/s400/Screenshot%2B-%2B11_22_2011%2B%252C%2B6_52_08%2BPM.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5677815550009401410" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;2. Specify the NAME, MIN, MAX, CYCLE and OTHER PROPERTIES:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/-TfLcEbG1UjE/TsunSHrC0eI/AAAAAAAACXY/NMul2pl_X6w/s1600/Screenshot%2B-%2B11_22_2011%2B%252C%2B6_56_51%2BPM.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 325px;" src="http://4.bp.blogspot.com/-TfLcEbG1UjE/TsunSHrC0eI/AAAAAAAACXY/NMul2pl_X6w/s400/Screenshot%2B-%2B11_22_2011%2B%252C%2B6_56_51%2BPM.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5677815684969714146" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;3. Once you entered the values for sequence object. You have to use following query to get NEXT sequence number using NEXT VALUE FOR keyword.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; select NEXT VALUE FOR dbo.GlobalSequence;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;RESULT:&lt;/span&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; 1  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If you execute above query, you will get the value as 1. Next time, if you executing same query, you will get the value as 2. Same way, you would get the number in sequential for every execution.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;4. With CYCLE OPTION:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; select NEXT VALUE FOR dbo.GlobalSequence;  &lt;br /&gt; select NEXT VALUE FOR dbo.GlobalSequence;  &lt;br /&gt; select NEXT VALUE FOR dbo.GlobalSequence;  &lt;br /&gt; select NEXT VALUE FOR dbo.GlobalSequence;  &lt;br /&gt; select NEXT VALUE FOR dbo.GlobalSequence;  &lt;br /&gt; select NEXT VALUE FOR dbo.GlobalSequence;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;if you execute the above query, you would get values like below.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; 1  &lt;br /&gt; 2  &lt;br /&gt; 3  &lt;br /&gt; 4  &lt;br /&gt; 5  &lt;br /&gt; 1  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;if sequence value reaches maximum value, it will start again with start value if you enabled the CYCLE option. Otherwise, it will throw an error like below;&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:100%;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; The sequence object 'GlobalSequence' has reached its minimum or maximum value. Restart the sequence object to allow new values to be generated.  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-2619610206285117880?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/2619610206285117880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=2619610206285117880' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/2619610206285117880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/2619610206285117880'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2011/11/sql-server-2012-features-sequence.html' title='SQL Server 2012 Features - Sequence Number'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-4CJrtcRVDb0/TsunKQ5_4EI/AAAAAAAACXM/ZlyiNlKvnOA/s72-c/Screenshot%2B-%2B11_22_2011%2B%252C%2B6_52_08%2BPM.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-977683668902955156</id><published>2011-10-25T02:59:00.000-07:00</published><updated>2011-10-25T03:01:01.092-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2012'/><title type='text'>SQL Server 2012 - Testimonials</title><content type='html'>http://www.microsoft.com/sqlserver/en/us/future-editions.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-977683668902955156?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/977683668902955156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=977683668902955156' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/977683668902955156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/977683668902955156'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2011/10/sql-server-2012-testimonials.html' title='SQL Server 2012 - Testimonials'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-2244020912908646243</id><published>2011-10-24T22:54:00.000-07:00</published><updated>2011-10-24T23:12:48.811-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>SQL SERVER – SHRINK Log File using SHRINKFILE</title><content type='html'>if you want to shrink the log file, you would use SHRINKFILE command like.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;DBCC SHRINKFILE(TestDBLog, 1)&lt;br /&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But in some cases (like production database), if you shrink log file by using above command, you won't get expected result. So, if you want to shrink log file to minimum size, take backup (*.bak) of entire database with SIMPLE recovery mode and then run the shrink file command.&lt;br /&gt;&lt;br /&gt;Here is the code to backup the database and shrink the log file &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;BACKUP DATABASE [TestDb] TO DISK = N'C:\TestDb.bak'&lt;br /&gt;GO&lt;br /&gt;DBCC SHRINKFILE(TestDBLog, 1)&lt;br /&gt;GO&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-2244020912908646243?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/2244020912908646243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=2244020912908646243' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/2244020912908646243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/2244020912908646243'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2011/10/sql-server-shrink-log-file-using.html' title='SQL SERVER – SHRINK Log File using SHRINKFILE'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-1752951171386165808</id><published>2010-11-26T08:33:00.000-08:00</published><updated>2010-11-26T09:18:53.331-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Automation'/><category scheme='http://www.blogger.com/atom/ns#' term='Selenium'/><title type='text'>Implementing IF..ELSE.. condition in Selenium IDE using Flow Control Add-On</title><content type='html'>Here I am going to discuss about on how to implement if else condition in selenium IDE.We can't implement the IF ELSE condition using core selenium IDE. To implement IF ELSE logic, you have to install Firefox "Flow Control" Add On. So, please install the "Flow Control" Add On using below URL.&lt;br /&gt;&lt;br /&gt;https://addons.mozilla.org/en-US/firefox/addon/85794/&lt;br /&gt;&lt;br /&gt;After installed, restart the firefox browser. Now, Flow Control commands available in the selenium IDE.&lt;br /&gt;&lt;br /&gt;Here are the commands:&lt;br /&gt;&lt;br /&gt;COMMAND|              TARGET                 |VALUE&lt;br /&gt;======================================================&lt;br /&gt;gotoif|                CONDITION              |LABELNAME&lt;br /&gt;label  |               LABELNAME|&lt;br /&gt;gotolabel                                   | LABELNAME&lt;br /&gt;&lt;br /&gt;Here is the example that i have used:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_YdNJ_-Tbfnw/TO_k2LfIylI/AAAAAAAAAwU/TYfEDJC6clI/s1600/selenium-IF-ELSE.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 60px;" src="http://2.bp.blogspot.com/_YdNJ_-Tbfnw/TO_k2LfIylI/AAAAAAAAAwU/TYfEDJC6clI/s400/selenium-IF-ELSE.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5543901285763828306" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From the above screenshot, first i am checking whether text("Please select") present in the page using "storeTextPresent" and assign the result to variable "POPUP_EXISTS". Then i am checking whether result is "false" or not. if the result is "false", then skip the next statement and move the execution to "target1"(label). Otherwise, continue the execution to next statement.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-1752951171386165808?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/1752951171386165808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=1752951171386165808' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/1752951171386165808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/1752951171386165808'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2010/11/implementing-ifelse-condition-in.html' title='Implementing IF..ELSE.. condition in Selenium IDE using Flow Control Add-On'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_YdNJ_-Tbfnw/TO_k2LfIylI/AAAAAAAAAwU/TYfEDJC6clI/s72-c/selenium-IF-ELSE.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-7090103497276061737</id><published>2010-08-30T04:51:00.000-07:00</published><updated>2010-08-30T05:15:59.171-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Clearing ASP.Net FileUpload Control using jQuery</title><content type='html'>Here i am going to discuss about on how to clear the file upload control using jQuery. To clear file upload control, you have to place file upload control within the DIV tag like below.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;HTML CODE:&lt;/h3&gt;&lt;br /&gt;&amp;lt;div id="div_fileupload"&amp;gt;&lt;br /&gt;&amp;lt;asp:FileUpload ID="fileUpload" runat="server" onkeypress="return false;" /&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;jQuery Custom Function:&lt;/h3&gt;&lt;br /&gt;// Clearing text of file upload control by means of replacing with HTML content.&lt;br /&gt;// you can place this code in your JS file.&lt;br /&gt;$.ClearFileUpload = function (fileUploadControlId) {&lt;br /&gt;    try {&lt;br /&gt;        document.getElementById(fileUploadControlId).innerHTML = document.getElementById(fileUploadControlId).innerHTML;&lt;br /&gt;        $(fileUploadControlId).focus();&lt;br /&gt;    } catch (e) {&lt;br /&gt;        //alert(e.Description);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Calling jQuery Custom Function from ASP.Net Design View:&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;function Checkfiles() {&lt;br /&gt;            var value = $('#fileUpload').val().toLowerCase();&lt;br /&gt;            if (value.length != 0) {&lt;br /&gt;                if (/.*\.(gif)|(jpeg)|(jpg)|(png)$/.test(value))&lt;br /&gt;                    return true;&lt;br /&gt;&lt;br /&gt;                $.ClearFileUpload('div_fileupload');&lt;br /&gt;                alert('Please Upload Gif or Jpg Images, or Png Files Only.');&lt;br /&gt;                return false;&lt;br /&gt;            }&lt;br /&gt;            else {&lt;br /&gt;                return true;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;You can call the above function in your ASP.Net Submit button OnClientClick event with checking the file extensions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-7090103497276061737?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/7090103497276061737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=7090103497276061737' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/7090103497276061737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/7090103497276061737'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2010/08/clearing-aspnet-fileupload-control.html' title='Clearing ASP.Net FileUpload Control using jQuery'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-5759477359435655151</id><published>2010-04-12T04:39:00.000-07:00</published><updated>2010-04-12T04:45:48.509-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='its me'/><title type='text'>Munnar Trip with company collegues</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_YdNJ_-Tbfnw/S8MHNDpISwI/AAAAAAAAArc/rsXOVr2knBA/s1600/DSC_0234.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 265px; height: 400px;" src="http://2.bp.blogspot.com/_YdNJ_-Tbfnw/S8MHNDpISwI/AAAAAAAAArc/rsXOVr2knBA/s400/DSC_0234.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5459215094200683266" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_YdNJ_-Tbfnw/S8MG_JHl8NI/AAAAAAAAArU/B9LFOgl72bw/s1600/DSC_0231.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 265px; height: 400px;" src="http://3.bp.blogspot.com/_YdNJ_-Tbfnw/S8MG_JHl8NI/AAAAAAAAArU/B9LFOgl72bw/s400/DSC_0231.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5459214855152464082" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can see more photos here &lt;a href="http://picasaweb.google.com/ayyanarj/MunnarTrip"&gt;http://picasaweb.google.com/ayyanarj/MunnarTrip&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-5759477359435655151?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/5759477359435655151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=5759477359435655151' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/5759477359435655151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/5759477359435655151'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2010/04/munnar-trip-with-company-collegues.html' title='Munnar Trip with company collegues'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_YdNJ_-Tbfnw/S8MHNDpISwI/AAAAAAAAArc/rsXOVr2knBA/s72-c/DSC_0234.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-7498000579592980679</id><published>2010-01-10T23:18:00.000-08:00</published><updated>2010-01-10T23:21:13.973-08:00</updated><title type='text'>Software Testing Best Practices</title><content type='html'>Here is the list of best practice tips:&lt;br /&gt;&lt;br /&gt;1. Analyze the requirement and problem thoroughly. If not clear, please ask development team lead or Project Manger.&lt;br /&gt;&lt;br /&gt;2. Test the application by breaking application into smaller modules.&lt;br /&gt;&lt;br /&gt;3. Write the test cases with all possible test data.&lt;br /&gt;&lt;br /&gt;4. Always try to finding the bugs in the application. Don’t assume that it will work.&lt;br /&gt;&lt;br /&gt;5. Test cases should be available to developer before development starts on that item. So that time consumption will reduce.&lt;br /&gt;&lt;br /&gt;6. Prioritize the test cases for all the modules. So that, whenever testing the application you can have checklist.&lt;br /&gt;&lt;br /&gt;7. Programmers won’t do the testing completely because they will think that their code is always right. But its tester responsibility to find the loop holes.&lt;br /&gt;&lt;br /&gt;8. Don’t stick to requirement on testing and go beyond that.&lt;br /&gt;&lt;br /&gt;9. Regression testing is more important. Please have history of bugs related to those modules. So, you can find the bugs easily.&lt;br /&gt;&lt;br /&gt;10. Sometimes we will change the application environment for testing. Tester should have knowledge on where we are doing the changes for testing. So, tester should verify those areas after moved to production.&lt;br /&gt;&lt;br /&gt;11. Tester should be kept away from developer environment. So that, tester wont gets distracted.&lt;br /&gt;&lt;br /&gt;12. Testers should have regular meeting everyday on sharing the latest knowledge and their experience.&lt;br /&gt;&lt;br /&gt;13. Have more communication with development lead or developer to avoid misunderstandings and making the application without bugs.&lt;br /&gt;&lt;br /&gt;14. Always try to communicate through email.&lt;br /&gt;&lt;br /&gt;15. Bug description should be clear, informative. Always, suggest your solution.&lt;br /&gt;&lt;br /&gt;16. Testers should be involved right from the requirement phase of the application.&lt;br /&gt;&lt;br /&gt;17. Update your testing knowledge daily by reading articles and discussion with others.&lt;br /&gt;&lt;br /&gt;18. Performance testing needs to be done if more users using the web application.&lt;br /&gt;&lt;br /&gt;19. Monitor your testing knowledge daily or weekly. So that, you came to know what you learned from today, what you have improved on your testing and what needs to be done to achieve to more.&lt;br /&gt;&lt;br /&gt;20. Make sure that you are following above practices and other good practices.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-7498000579592980679?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/7498000579592980679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=7498000579592980679' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/7498000579592980679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/7498000579592980679'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2010/01/software-testing-best-practices.html' title='Software Testing Best Practices'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-1601057972660770560</id><published>2009-02-03T21:21:00.000-08:00</published><updated>2009-02-03T21:44:43.721-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Thickbox'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Modal and Modalless Popup Window Using jQuery and Thickbox in ASP.Net - Part II</title><content type='html'>In &lt;a href="http://ayyanar.blogspot.com/2009/02/modal-and-modalless-popup-window-using.html"&gt;Part I&lt;/a&gt;, i have explained how to open image and ASPX page as popup in parent page itself.&lt;br /&gt;&lt;br /&gt;In this part, i am going to explain how to open panel or div as popup in same page.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&amp;lt;a href&lt;strong&gt;="#TB_inline?inlineId=popupdiv&lt;/strong&gt;&amp;height=120&amp;width=320"  &lt;strong&gt;class="thickbox"&lt;/strong&gt; &amp;gt;open child window&amp;lt;/a&amp;gt;&lt;br /&gt;    &amp;lt;/div&amp;gt;&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    &amp;lt;div &lt;strong&gt;id="popupdiv" style="display:none"&lt;/strong&gt;&amp;gt;&lt;br /&gt;    &lt;br /&gt;        &amp;lt;table style="width: 30%"&amp;gt;&lt;br /&gt;            &amp;lt;tr&amp;gt;&lt;br /&gt;                &amp;lt;td &amp;gt;&lt;br /&gt;        Comments :&amp;lt;/td&amp;gt;&lt;br /&gt;                &amp;lt;td&amp;gt;&lt;br /&gt;        &amp;lt;asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;            &amp;lt;/tr&amp;gt;&lt;br /&gt;            &amp;lt;tr&amp;gt;&lt;br /&gt;                &amp;lt;td&amp;gt;&lt;br /&gt;                &amp;lt;/td&amp;gt;&lt;br /&gt;                &amp;lt;td&amp;gt;&lt;br /&gt;        &amp;lt;asp:Button ID="Button1" runat="server" Text="Save" /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;            &amp;lt;/tr&amp;gt;&lt;br /&gt;            &amp;lt;tr&amp;gt;&lt;br /&gt;                &amp;lt;td &amp;gt;&lt;br /&gt;                &amp;lt;/td&amp;gt;&lt;br /&gt;                &amp;lt;td &amp;gt;&lt;br /&gt;                &amp;lt;/td&amp;gt;&lt;br /&gt;            &amp;lt;/tr&amp;gt;&lt;br /&gt;        &amp;lt;/table&amp;gt;&lt;br /&gt;    &amp;lt;/div&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;you have specify href with following important property.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;#TB_inline&lt;/strong&gt;  - indicates popup content present in same page.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;inlineId&lt;/strong&gt;    - panel or div id that should show when clicked that link.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And also, you have to specify CSS class as &lt;strong&gt;"thickbox"&lt;/strong&gt; .&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Screenshot:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_YdNJ_-Tbfnw/SYkqAt6JeSI/AAAAAAAAAbo/KSsmVKuF5sY/s1600-h/popup_inline.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 241px;" src="http://3.bp.blogspot.com/_YdNJ_-Tbfnw/SYkqAt6JeSI/AAAAAAAAAbo/KSsmVKuF5sY/s400/popup_inline.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5298812628389951778" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In next part, i will explain how to open popup window dynamically without having CSS class as "thickbox".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-1601057972660770560?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/1601057972660770560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=1601057972660770560' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/1601057972660770560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/1601057972660770560'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2009/02/modal-and-modalless-popup-window-using_03.html' title='Modal and Modalless Popup Window Using jQuery and Thickbox in ASP.Net - Part II'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/SYkqAt6JeSI/AAAAAAAAAbo/KSsmVKuF5sY/s72-c/popup_inline.JPG' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-8714012604581852012</id><published>2009-02-03T05:18:00.000-08:00</published><updated>2009-02-03T21:15:45.875-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Thickbox'/><category scheme='http://www.blogger.com/atom/ns#' term='Plugins'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Modal and Modalless Popup Window Using jQuery and Thickbox in ASP.Net - Part I</title><content type='html'>Here I am going to explain on how to open the popwindow using jQuery and Thickbox.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Traditional Method:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In ASP.Net, you will use javascript "window.open" method to open the popup window like.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;window.open('popup.aspx','','height=220,width=500');&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;The above method will open a popup.aspx page as popup with respective width and height.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;br /&gt;1. No tight linkage between parent and child window(no clarity between parent and child window).&lt;br /&gt;2. We can close the popup window without doing any operation.&lt;br /&gt;3. Open as seperate window instead of in same page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;jQuery &amp; THICKBOX:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;we can avoid those cons by using jQuery and Thickbox.&lt;br /&gt;For that, first we have to download the jQuery and THICKBOX js file from respective website&lt;br /&gt;&lt;br /&gt;jQuery : &lt;a href="http://jQuery.com"&gt;http://jQuery.com&lt;/a&gt;&lt;br /&gt;THICKBOX : &lt;a href="http://jquery.com/demo/thickbox/"&gt;http://jquery.com/demo/thickbox/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After downloaded, you have to link those js file within HTML head tag of your ASPX page like below.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;     &lt;br /&gt;&amp;lt;style type="text/css" media="all"&amp;gt;@import "Assets/css/thickbox.css";&amp;lt;/style&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script language="javascript" src="Assets/js/jquery-1.2.6.min.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;    &amp;lt;script language="javascript" src="Assets/js/thickbox.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Simple Example:&lt;/strong&gt;&lt;br /&gt;To open the image as Popup, here is the HTML code.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&amp;lt;a href="images/DSCN0365.JPG" alt="click here" &lt;strong&gt;class="thickbox"&lt;/strong&gt;&amp;gt;&amp;lt;img src="images/DSCN0365.JPG"  /&amp;gt;&amp;lt;/a&amp;gt; &lt;/em&gt;&lt;br /&gt;&lt;br /&gt;you have to specify class as &lt;strong&gt;thickbox &lt;/strong&gt; for anchor tag to open an image in same page.&lt;br /&gt;&lt;br /&gt;when you click the link, it will show like below.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_YdNJ_-Tbfnw/SYhOis2hgZI/AAAAAAAAAbQ/CTTTCwKpczo/s1600-h/inr_1.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 214px;" src="http://2.bp.blogspot.com/_YdNJ_-Tbfnw/SYhOis2hgZI/AAAAAAAAAbQ/CTTTCwKpczo/s400/inr_1.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5298571319663755666" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Open seperate page as Popup window:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;To open seperate page as popup window, here is html code.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&amp;lt;a href="childwindow.aspx?TB_iframe=true&amp;height=250&amp;width=400"  &lt;strong&gt;class="thickbox"&lt;/strong&gt; &amp;gt;open child window&amp;lt;/a&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;you have to specify CSS class as &lt;strong&gt;"thickbox"&lt;/strong&gt; to open childwindow.aspx as popup in same page.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;href="childwindow.aspx?TB_iframe=true&amp;height=250&amp;width=400"&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;TB_iframe=true -- says popup page is seperate page.&lt;br /&gt;width, height -- says size of popup window.&lt;br /&gt;&lt;br /&gt;if you click the anchor link, it will show the child window like below.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_YdNJ_-Tbfnw/SYhSo3GN_1I/AAAAAAAAAbY/Xc84RDgxoIs/s1600-h/popup.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 251px;" src="http://3.bp.blogspot.com/_YdNJ_-Tbfnw/SYhSo3GN_1I/AAAAAAAAAbY/Xc84RDgxoIs/s400/popup.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5298575823539666770" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is modalless popup window. i.e. you can close the popup window by clicking close link in popup window OR pressing ESC key.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Modal Popup:&lt;/strong&gt;&lt;br /&gt;Even, you can show the modal popup window by adding another property of "modal=true" in anchor href attribute value like below&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&amp;lt;a href="childwindow.aspx?TB_iframe=true&amp;height=250&amp;width=400&amp;&lt;strong&gt;modal=true&lt;/strong&gt;"  &lt;strong&gt;class="thickbox"&lt;/strong&gt; &amp;gt;open child window&amp;lt;/a&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if you click the above link, it will show without close link in popup window like below.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_YdNJ_-Tbfnw/SYhUgJUMUEI/AAAAAAAAAbg/h0PxfpesYRQ/s1600-h/popup-modal.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 222px;" src="http://3.bp.blogspot.com/_YdNJ_-Tbfnw/SYhUgJUMUEI/AAAAAAAAAbg/h0PxfpesYRQ/s400/popup-modal.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5298577872834547778" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now you can't close the popup window without pressing save button.&lt;br /&gt;&lt;br /&gt;In next part, i will explain how to open panel in same page as popup.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-8714012604581852012?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/8714012604581852012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=8714012604581852012' title='31 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/8714012604581852012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/8714012604581852012'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2009/02/modal-and-modalless-popup-window-using.html' title='Modal and Modalless Popup Window Using jQuery and Thickbox in ASP.Net - Part I'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_YdNJ_-Tbfnw/SYhOis2hgZI/AAAAAAAAAbQ/CTTTCwKpczo/s72-c/inr_1.JPG' height='72' width='72'/><thr:total>31</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-781175148373075350</id><published>2009-02-02T21:25:00.000-08:00</published><updated>2009-02-03T05:06:38.393-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='C#.Net'/><title type='text'>C# Code Header Designer</title><content type='html'>Here i am going to discuss about C# code header designer. while developing the project or product, developer needs to add header to C#/VB code file depending upon the company standards.&lt;br /&gt;&lt;br /&gt;To add header, first we will create header for one C# code file and then do the copy and paste of header with small changes for other code files.&lt;br /&gt;&lt;br /&gt;it's time consuming process to do the copy and paste for each and every file. Even some of the company not having header so far, but if they want to add header for all projects that they were handled.it would take more time to complete.&lt;br /&gt;&lt;br /&gt;To avoid those difficulties and time consumption, msdn developer developed one tool to add headers easily.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Screenshot:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_YdNJ_-Tbfnw/SYfY86Tgz0I/AAAAAAAAAbI/CdheavkHhzw/s1600-h/header.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 340px;" src="http://1.bp.blogspot.com/_YdNJ_-Tbfnw/SYfY86Tgz0I/AAAAAAAAAbI/CdheavkHhzw/s400/header.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5298442027579526978" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Header Template:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;/*  ----------------------------------------------------------------&lt;br /&gt; *  [COMPANY NAME]&lt;br /&gt; *  ----------------------------------------------------------------&lt;br /&gt; *  [PRODUCT NAME]&lt;br /&gt; *  ----------------------------------------------------------------&lt;br /&gt; *  File:       [AUTO:FILE]&lt;br /&gt; *  Author:     [AUTO:AUTHOR]&lt;br /&gt; *  ----------------------------------------------------------------&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;By using, we can created the template for header and configure the values for keys in template.After template is prepared, PRESS GO button to add the header to code files.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C# CODE FILE:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;/*  ----------------------------------------------------------------&lt;br /&gt; *  SPi Technologies&lt;br /&gt; *  ----------------------------------------------------------------&lt;br /&gt; *  SPiRE&lt;br /&gt; *  ----------------------------------------------------------------&lt;br /&gt; *  File:       Server.cs&lt;br /&gt; *  Author:     SPIDOM\JAyyanar&lt;br /&gt; *  ----------------------------------------------------------------&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;Click &lt;a href="http://code.msdn.microsoft.com/HeaderDesigner/Release/ProjectReleases.aspx?ReleaseId=2081"&gt;here &lt;/a&gt;to download this tool, source code and user guide.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-781175148373075350?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/781175148373075350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=781175148373075350' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/781175148373075350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/781175148373075350'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2009/02/c-code-header-designer.html' title='C# Code Header Designer'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_YdNJ_-Tbfnw/SYfY86Tgz0I/AAAAAAAAAbI/CdheavkHhzw/s72-c/header.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-3218350978106278942</id><published>2009-01-27T02:14:00.000-08:00</published><updated>2009-01-27T02:56:07.681-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Intellisense for jQuery - Visual Studio 2008</title><content type='html'>Here i am going to explain on how to enable intellisense for jQuery in VS 2008. &lt;br /&gt;&lt;br /&gt;Currently VS 2008 installation pack does not come with jQuery Intellisense. MS has plan to providing intellisense for VS 2010.&lt;br /&gt;&lt;br /&gt;For VS 2008, MS release Hotfix for jQuery Intellisense.&lt;br /&gt;&lt;br /&gt;Here are the steps:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 1:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Download &lt;a href="https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=10826"&gt;hotfix&lt;/a&gt; and install it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 2:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Download jQuery &lt;a href="http://docs.jquery.com/Release:jQuery_1.2.6"&gt;core &lt;/a&gt;js and &lt;a href="http://code.jquery.com/jquery-1.2.6-vsdoc.js."&gt;doc&lt;/a&gt; file.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 3:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Add those 2 JS files in Web Site Project in same location and link those JS files in ASPX file.&lt;br /&gt;&lt;br /&gt;After you have refered those 2 files in ASPX file, it will automatically enable Intellisense for jQuery.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;CODE:&lt;br /&gt;&lt;br /&gt;jQuery:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;$(function()&lt;br /&gt;    {&lt;br /&gt;        $("#TextBox1").bind("focus", function(event)&lt;br /&gt;                           {    &lt;br /&gt;                                if ($(this).val() == this.defaultValue)&lt;br /&gt;                                $(this).val("");&lt;br /&gt;                           }&lt;br /&gt;                        );&lt;br /&gt;                        &lt;br /&gt;        $("#TextBox1").bind("blur", function(event)&lt;br /&gt;                           {    &lt;br /&gt;                                if ($(this).val() == "")&lt;br /&gt;                                $(this).val(this.defaultValue);&lt;br /&gt;                           }&lt;br /&gt;                        );&lt;br /&gt;    }&lt;br /&gt;    );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;First Name : &amp;lt;asp:TextBox ID="TextBox1" runat="server" Text="Enter First Name"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;See the screenshot:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_YdNJ_-Tbfnw/SX7kYk0p9AI/AAAAAAAAAbA/KdjrHf_8NOk/s1600-h/JQuery+Intellisense.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 218px;" src="http://4.bp.blogspot.com/_YdNJ_-Tbfnw/SX7kYk0p9AI/AAAAAAAAAbA/KdjrHf_8NOk/s400/JQuery+Intellisense.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5295921322686804994" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-3218350978106278942?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/3218350978106278942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=3218350978106278942' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/3218350978106278942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/3218350978106278942'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2009/01/intellisense-for-jquery-visual-studio.html' title='Intellisense for jQuery - Visual Studio 2008'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_YdNJ_-Tbfnw/SX7kYk0p9AI/AAAAAAAAAbA/KdjrHf_8NOk/s72-c/JQuery+Intellisense.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-5524752488167018952</id><published>2008-11-01T22:35:00.000-07:00</published><updated>2008-11-03T01:34:37.463-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Dotnet'/><title type='text'>C# 4.0: Optional and Named Parameters - CTP Release</title><content type='html'>C# Chief Architect &lt;strong&gt;Anders Hejlsberg &lt;/strong&gt; explained the future of C# in PDC2008.Initial CTP release of C# 4.0 has a feature of Optional and Named Parameters.&lt;br /&gt;&lt;br /&gt;I have already explained the another featire of C# 4.0 is &lt;a href="http://ayyanar.blogspot.com/2008/11/c-40-dynamic-programming-ctp-release.html"&gt;Dynamic Programming&lt;/a&gt; in my previous post.&lt;br /&gt;&lt;br /&gt;Here I am going to explain about Named and Optional Parameters.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C# 1.0, 2.0, 3.0&lt;/strong&gt; doest not have a feature of Optional parameter. But in VB, we can define a method with an optional parameters.&lt;br /&gt;&lt;br /&gt;Developers facing some difficulties of not having an optional parameter in C# especially when communicating with COM object.&lt;br /&gt;&lt;br /&gt;C# 4.0 going to have a feature of Optional Parameter.&lt;br /&gt;&lt;br /&gt;In previous version of C#, we have to implement multiple overloaded methods to have a variable parameters in the function like&lt;br /&gt;&lt;br /&gt;&lt;div style="color:blue"&gt;&lt;br /&gt;&lt;strong&gt;C# 3.0:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;    public int Add(int x, int y)&lt;br /&gt;    {&lt;br /&gt;        return x + y;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int Add(int x, int y, int z)&lt;br /&gt;    {&lt;br /&gt;        return x + y + z;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C# 4.0 (Optional Parameter):&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;    public int Add(int x, int y, int z = 0)&lt;br /&gt;    {&lt;br /&gt;        return x + y + z;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    //calling&lt;br /&gt;    Add(1,2);&lt;br /&gt;    Add(1,2,3&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Here we can declare the parameter as an optional by initializing the value to the variable.&lt;br /&gt;&lt;br /&gt;if we have multiple optional parameter in a function, we have to initialize the value sequentially in VB like&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;VB:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color:blue"&gt;&lt;br /&gt;Public Function Add(ByVal x As Integer, ByVal y As Integer, Optional ByVal z As Integer = 5, Optional ByVal a As Integer = 10) As Integer&lt;br /&gt;&lt;br /&gt;        Return x + y + z + a&lt;br /&gt;&lt;br /&gt;    End Function&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;From the above code, it has 2 optional parameter. we can't pass value to parameter "a" without passing value for parameter "z".&lt;br /&gt;&lt;br /&gt;&lt;div style="color:blue"&gt;&lt;br /&gt;// Calling &lt;br /&gt;Add(1, 2, 5, 15)&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt; C# 4.0 - Named Parameter &lt;/strong&gt;&lt;br /&gt;   public int Add(int x, int y, int z = 5, int a = 10)&lt;br /&gt;    {&lt;br /&gt;        return x + y + z + a;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//calling&lt;br /&gt;Add(1,2,a:15);&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;From the above code, it has 2 optional parameter. But here we can pass a value to parameter "a" without passing a value for "z" by using name of parameter like a:15.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-5524752488167018952?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/5524752488167018952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=5524752488167018952' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/5524752488167018952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/5524752488167018952'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2008/11/c-40-optional-and-named-parameters-ctp.html' title='C# 4.0: Optional and Named Parameters - CTP Release'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-3424207644644185458</id><published>2008-11-01T20:49:00.000-07:00</published><updated>2008-11-03T01:35:10.746-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Dotnet'/><title type='text'>C# 4.0 : Dynamic Programming -- CTP Release</title><content type='html'>C# Chief Architect &lt;strong&gt;Anders Hejlsberg &lt;/strong&gt; explained the future of C# in PDC2008.Initial CTP release of C# 4.0 has some features like&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. Dynamically Typed Objects.&lt;br /&gt;2. Optional and Named Parameters&lt;br /&gt;3. Improved COM Interoperability.&lt;br /&gt;4. Co and Contra Variance.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Here I am going to explain about Dynamic Programming.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Dynamically Typed Objects:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Here is the code for traditional way of calling typed object methods.&lt;br /&gt;&lt;div style="color:blue"&gt;&lt;br /&gt;EmployeeInfo eInfo = new EmployeeInfo();&lt;br /&gt;eInfo.EmployeeID = 1;&lt;br /&gt;eInfo.FirstName = "Ayyanar";&lt;br /&gt;eInfo.LastName = "Jayabalan";&lt;br /&gt;&lt;br /&gt;Employee emp = GetEmployee();&lt;br /&gt;bool affected = emp.AddEmployee(eInfo);&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;From the above code, we know the type "Employee" to call the AddEmployee methods.&lt;br /&gt;&lt;br /&gt;if we does not know the Type("Employee"), we can use Reflection to call the AddEmployee method.&lt;br /&gt;&lt;br /&gt;Here is the code to call the method using Reflection.&lt;br /&gt;&lt;br /&gt;&lt;div style="color:blue"&gt;&lt;br /&gt;object refEmp = GetEmployee();&lt;br /&gt;&lt;br /&gt;Type type = refEmp.GetType();&lt;br /&gt;&lt;br /&gt;object objAffected = type.InvokeMember("AddEmployee", System.Reflection.BindingFlags.InvokeMethod, null, null, new object[] { eInfo });&lt;br /&gt;&lt;br /&gt;bool affected = (bool)objAffected;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C# 4.0:&lt;/strong&gt;&lt;br /&gt;-------&lt;br /&gt;&lt;br /&gt;We can call method directly without using Reflection for UnKnown Typed object.&lt;br /&gt;&lt;br /&gt;&lt;div style="color:blue"&gt;&lt;br /&gt;dynamic emp = GetEmployee();&lt;br /&gt;&lt;br /&gt;bool affected = emp.AddEmployee(eInfo);&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;We have to declared as a "dynamic" for unknown typed objects.&lt;br /&gt;&lt;br /&gt;Method calling decision taken at RUNTIME instead of COMPILE TIME.&lt;br /&gt;&lt;br /&gt;And also, .Net does not throw error while compiling the code and does not provide INTELLISENSE for dynamic type.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-3424207644644185458?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/3424207644644185458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=3424207644644185458' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/3424207644644185458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/3424207644644185458'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2008/11/c-40-dynamic-programming-ctp-release.html' title='C# 4.0 : Dynamic Programming -- CTP Release'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-3512770688951257667</id><published>2008-11-01T06:13:00.000-07:00</published><updated>2008-11-01T06:20:14.070-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Azure Services Platform'/><title type='text'>Microsoft Azure Services Platform</title><content type='html'>The Azure™ Services Platform (Azure) is an internet-scale cloud services platform hosted in Microsoft data centers, which provides an operating system and a set of developer services that can be used individually or together. Azure’s flexible and interoperable platform can be used to build new applications to run from the cloud or enhance existing applications with cloud-based capabilities. Its open architecture gives developers the choice to build web applications, applications running on connected devices, PCs, servers, or hybrid solutions offering the best of online and on-premises.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_YdNJ_-Tbfnw/SQxWxkNBtRI/AAAAAAAAAZU/4O5xdbx5VFU/s1600-h/servicesPlatform.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 184px;" src="http://2.bp.blogspot.com/_YdNJ_-Tbfnw/SQxWxkNBtRI/AAAAAAAAAZU/4O5xdbx5VFU/s400/servicesPlatform.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5263677474021160210" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Click &lt;a href="http://www.microsoft.com/azure/default.mspx"&gt;here &lt;/a&gt;to know more about Azure.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/azure/whatisazure.mspx"&gt;What is the Azure Services Platform?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/azure/whyuseazure.mspx"&gt;Why use the Azure Services Platform?&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-3512770688951257667?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/3512770688951257667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=3512770688951257667' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/3512770688951257667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/3512770688951257667'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2008/11/microsoft-azure-services-platform.html' title='Microsoft Azure Services Platform'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_YdNJ_-Tbfnw/SQxWxkNBtRI/AAAAAAAAAZU/4O5xdbx5VFU/s72-c/servicesPlatform.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-1458952572052821553</id><published>2008-11-01T05:15:00.000-07:00</published><updated>2008-11-01T05:18:14.775-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Framework 4.0'/><title type='text'>Visual Studio 2010 and Framework 4.0 - CTP Release</title><content type='html'>Microsoft released the CTP version of Visual Studio 2010 and Framework 4.0.&lt;br /&gt;&lt;br /&gt;Here is the link to download. &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=922B4655-93D0-4476-BDA4-94CF5F8D4814&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=922B4655-93D0-4476-BDA4-94CF5F8D4814&amp;displaylang=en&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-1458952572052821553?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/1458952572052821553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=1458952572052821553' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/1458952572052821553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/1458952572052821553'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2008/11/visual-studio-2010-and-framework-40-ctp.html' title='Visual Studio 2010 and Framework 4.0 - CTP Release'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-3030059707978126924</id><published>2008-10-26T09:29:00.000-07:00</published><updated>2008-10-26T09:35:03.429-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Dotnet'/><category scheme='http://www.blogger.com/atom/ns#' term='Framework 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Framework'/><title type='text'>Next Generation Developer Tool : Visual Studio 2010 and .Net Framework 4.0</title><content type='html'>Visual Studio 2010 and the .NET Framework 4.0 mark the next generation of developer tools from Microsoft. Designed to address the latest needs of developers, Visual Studio and the .NET Framework deliver key innovations in the following pillars:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Democratizing Application Lifecycle Management&lt;/strong&gt;&lt;br /&gt;Application Lifecycle Management (ALM) crosses many roles within an organization and traditionally not every one of the roles has been an equal player in the process. Visual Studio Team System 2010 continues to build the platform for functional equality and shared commitment across an organization’s ALM process.&lt;br /&gt;&lt;strong&gt;Enabling emerging trends&lt;/strong&gt;&lt;br /&gt;Every year the industry develops new technologies and new trends. With Visual Studio 2010, Microsoft delivers tooling and framework support for the latest innovations in application architecture, development and deployment.&lt;br /&gt;&lt;strong&gt;Inspiring developer delight&lt;/strong&gt;&lt;br /&gt;Ever since the first release of Visual Studio, Microsoft has set the bar for developer productivity and flexibility. Visual Studio 2010 continues to deliver on the core developer experience by significantly improving upon it for roles involved with the software development process.&lt;br /&gt;&lt;strong&gt;Riding the next generation platform wave&lt;/strong&gt;&lt;br /&gt;Microsoft continues to invest in the market leading operating system, productivity application and server platforms to deliver increased customer value in these offerings. With Visual Studio 2010 customers will have the tooling support needed to create amazing solutions around these technologies.&lt;br /&gt;&lt;strong&gt;Breakthrough Departmental Applications&lt;/strong&gt;&lt;br /&gt;Customers continue to build applications that span from department to the enterprise. Visual Studio 2010 will ensure development is supported across this wide spectrum of applications.&lt;br /&gt;&lt;br /&gt;Click &lt;a href="http://msdn.microsoft.com/en-us/vstudio/products/cc948977.aspx"&gt;here&lt;/a&gt; to know more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-3030059707978126924?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/3030059707978126924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=3030059707978126924' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/3030059707978126924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/3030059707978126924'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2008/10/next-generation-developer-tool-visual.html' title='Next Generation Developer Tool : Visual Studio 2010 and .Net Framework 4.0'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-588238061678529707</id><published>2008-06-25T03:05:00.000-07:00</published><updated>2008-06-25T06:46:02.876-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net 2.0'/><title type='text'>Solution: Session Timeout not working on Production Server in ASP.Net</title><content type='html'>&lt;strong&gt;Problem:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;You may faced the session timeout problem on production web server after deployed the ASP.Net Web Application. Even after you have changed the Web.Config setting like&lt;br /&gt;&lt;br /&gt;&amp;lt;sessionState mode="InProc"  cookieless="false" timeout="300"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Session will get lost after default session timeout duration (20 Minutes).&lt;br /&gt;&lt;br /&gt;You may also have tried to change the default session timeout value in IIS (Internet Information Server).&lt;br /&gt;&lt;br /&gt;In all the above cases, session timeout value is lost after 20 Minutes (default session timeout value).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is the solution to maintain the session for long period (above 20 minutes) on Production Web Server. To maintain the session, we have to refresh the website atleast before 20 minutes (e.g every 10 minutes). To refresh the website, here is the tricky solution.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ASP.Net 2.0 Web Project:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Instead of refreshing each ASPX page, we can achieve this with single webform.&lt;br /&gt;Add a new webform (RefreshASPXToKeepSessionAlive.aspx) in the web project. Add the metatag information within HEADER of this web page.&lt;br /&gt;E.g.&lt;br /&gt;&lt;br /&gt;&amp;lt;head runat="server" &amp;gt;&lt;br /&gt;&lt;strong&gt;&amp;lt;meta http-equiv="refresh" content="600" /&amp;gt;&lt;/strong&gt;&lt;br /&gt;    &amp;lt;title&gt;Poll this page from master page to keep session alive&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&lt;br /&gt;The above META tag information says refresh the page for every 600 seconds (10 Minutes).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Master Page:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;You have to call the above created page from MASTER PAGE. you can call this without affecting other web forms master design, use the hidden iframe logic like.&lt;br /&gt;&lt;br /&gt;&lt;iframe src ="RefreshASPXToKeepSessionAlive.aspx" style ="display:none"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;You have to use above iframe HTML tag outside the &lt;strong&gt;content placeholder&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;The above technique refresh the RefreshASPXToKeepSessionAlive.aspx page from master page for every 20 Minutes. So, website will maintain the session for long period (greater than 20 Minutes) without losing.&lt;br /&gt;&lt;br /&gt;if you got any problem on using the IFRAME tricks, add the iframe tag dynamically in HTML view instead of adding that in design time.&lt;br /&gt;&lt;br /&gt;E.g.&lt;br /&gt;&lt;br /&gt; &amp;lt;%&lt;br /&gt;                                    if (Session["IsUserLogged"] != null &amp;&amp; ((bool)Session["IsUserLogged"]) == true)&lt;br /&gt;                                    {&lt;br /&gt;                                        Response.Write("&amp;lt;iframe src ='RefreshASPXToKeepSessionAlive.aspx' style ='display:none'&amp;gt;&amp;lt;/iframe&amp;gt;");&lt;br /&gt;                                    }&lt;br /&gt;                                 %&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-588238061678529707?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/588238061678529707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=588238061678529707' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/588238061678529707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/588238061678529707'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2008/06/solution-session-timeout-not-working-on.html' title='Solution: Session Timeout not working on Production Server in ASP.Net'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-4930823431350481359</id><published>2008-05-31T03:59:00.000-07:00</published><updated>2008-12-09T19:19:28.821-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Dotnet'/><title type='text'>Source Code Analysis for C# - StyleCop</title><content type='html'>Microsoft released the tool for source code analysis for C#.Currently MS developed this only for C# not for VB. Microsoft using this for their internal purpose also. They have named this as "StyleCop". Earlier, MS released the tool called "FxCop" that analyse the compiled binaries but "StyleCop" analyse the source code. It provides the set of rules for style, documentation ,readability, etc. Currently they have defined around 200 rules. Those rules are not Customizable.But you switch ON/OFF the rules depending on your needs or company standard.&lt;br /&gt;&lt;br /&gt;They have covered the following catagory rules:&lt;br /&gt;&lt;br /&gt;1. Documentation&lt;br /&gt;2. Layout&lt;br /&gt;3. Maintainability&lt;br /&gt;4. Naming&lt;br /&gt;5. Ordering&lt;br /&gt;6. Readability&lt;br /&gt;7. Spacing&lt;br /&gt;&lt;br /&gt;Screenshot of rules in StyleCop:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_YdNJ_-Tbfnw/SEE0A0a1FcI/AAAAAAAAASI/oNwFROO2Rpw/s1600-h/Category.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_YdNJ_-Tbfnw/SEE0A0a1FcI/AAAAAAAAASI/oNwFROO2Rpw/s400/Category.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5206499832892822978" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Screenshot of using this tool in application:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_YdNJ_-Tbfnw/SEE0S0a1FdI/AAAAAAAAASQ/E4HZcdQ6KDw/s1600-h/IDE.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_YdNJ_-Tbfnw/SEE0S0a1FdI/AAAAAAAAASQ/E4HZcdQ6KDw/s400/IDE.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5206500142130468306" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The ultimate goal of the source code analysis tool is allow you to give clean , consistant code with team members and for others who view your code with more readability.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.msdn.microsoft.com/sourceanalysis/Release/ProjectReleases.aspx?ReleaseId=1047"&gt;Click here&lt;/a&gt; to download the Source Code Analysis Tool&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-4930823431350481359?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/4930823431350481359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=4930823431350481359' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/4930823431350481359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/4930823431350481359'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2008/05/source-code-analysis-for-c-stylecop.html' title='Source Code Analysis for C# - StyleCop'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_YdNJ_-Tbfnw/SEE0A0a1FcI/AAAAAAAAASI/oNwFROO2Rpw/s72-c/Category.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-6459872911644309663</id><published>2008-03-11T22:33:00.000-07:00</published><updated>2008-12-09T19:19:29.106-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='its me'/><title type='text'>Official Trip to US</title><content type='html'>Here are the pictures that took at Austin, TX&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_YdNJ_-Tbfnw/R9ynJQyaZLI/AAAAAAAAAQc/ZZq9wU8ejB0/s1600-h/DSCN0302.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_YdNJ_-Tbfnw/R9ynJQyaZLI/AAAAAAAAAQc/ZZq9wU8ejB0/s400/DSCN0302.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178197449136301234" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_YdNJ_-Tbfnw/R9drsQyaYiI/AAAAAAAAAKg/GdEh-WqtcH4/s1600-h/DSCN0364.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_YdNJ_-Tbfnw/R9drsQyaYiI/AAAAAAAAAKg/GdEh-WqtcH4/s400/DSCN0364.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5176724704850502178" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;click this link to see more photos.. &lt;a href="http://picasaweb.google.com/ayyanarj"&gt;http://picasaweb.google.com/ayyanarj&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-6459872911644309663?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/6459872911644309663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=6459872911644309663' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/6459872911644309663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/6459872911644309663'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2008/03/official-trip-to-us.html' title='Official Trip to US'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_YdNJ_-Tbfnw/R9ynJQyaZLI/AAAAAAAAAQc/ZZq9wU8ejB0/s72-c/DSCN0302.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-3404077708787070644</id><published>2007-12-26T11:02:00.000-08:00</published><updated>2007-12-29T17:20:16.922-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dotnet'/><category scheme='http://www.blogger.com/atom/ns#' term='C#.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='C# 3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><category scheme='http://www.blogger.com/atom/ns#' term='Performance'/><title type='text'>Caching Sql Parameters in C#.Net</title><content type='html'>Here I am going to discuss about how to cache the sql parameters.&lt;br /&gt;&lt;br /&gt;Suppose if you want to add records to the table, either you use Direct-SQL and Stored Procedure. Stored Procedure is compiled one so it’s faster than Direct-SQL.&lt;br /&gt;&lt;br /&gt;If you are using stored procedure, you call the stored procedure from the client side either by &lt;strong&gt;EXEC &lt;/strong&gt;Or &lt;strong&gt;Parameterized&lt;/strong&gt; call.&lt;br /&gt;&lt;br /&gt;Parameterized call reuse the existing execution plan instead of creating the new execution plan every time when you call using EXEC.&lt;br /&gt;&lt;br /&gt;So, Parameterized call is more efficient than EXEC.&lt;br /&gt;&lt;br /&gt;If you are using Parameterized call, you have to create the array of Sql Parameters to pass the parameter value. You have to create the array of parameters every time when you call the stored procedure.&lt;br /&gt;&lt;br /&gt;If you are calling 100 times, 100 times you have to create the array of parameters.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Cache:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Instead of creating the parameters every time, you can the cache the array of sql parameters in the first call. In next call, you can get the Clone of Sql Parameters from Cache. And then assign the values to the clone sql parameter.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Microsoft released the Enterprise Library having the parameter caching mechanism.&lt;br /&gt;&lt;br /&gt;Here I am going to discuss the parameter caching is similar to that in a simple way.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Parameter Cache Code:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #0000FF"&gt;&lt;br /&gt;public class ParameterCache&lt;br /&gt;    {&lt;br /&gt;    &lt;br /&gt;        private static Hashtable paramCache = Hashtable.Synchronized(new Hashtable());&lt;br /&gt;&lt;br /&gt;       &lt;br /&gt;        // Create and return a copy of the IDataParameter array.&lt;br /&gt;        private static IDataParameter[] CloneParameters(IDataParameter[] originalParameters)&lt;br /&gt;        {&lt;br /&gt;            IDataParameter[] clonedParameters = new IDataParameter[originalParameters.Length];&lt;br /&gt;&lt;br /&gt;            for (int i = 0, j = originalParameters.Length; i &lt; j; i++)&lt;br /&gt;            {&lt;br /&gt;                clonedParameters[i] = (IDataParameter)((ICloneable)originalParameters[i]).Clone();&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            return clonedParameters;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        // Empties all items from the cache&lt;br /&gt;        public static void Clear()&lt;br /&gt;        {&lt;br /&gt;            paramCache.Clear();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        // Add a parameter array to the cache for the command.&lt;br /&gt;        public static void AddParameterSetToCache(string connectionString, string storedProcedure, IDataParameter[] parameters)&lt;br /&gt;        {&lt;br /&gt;            string key = CreateHashKey(connectionString, storedProcedure);&lt;br /&gt;            paramCache[key] = parameters;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        // Gets a parameter array from the cache for the command. Returns null if no parameters are found.&lt;br /&gt;        public static IDataParameter[] GetCachedParameterSet(string connectionString, string storedProcedure)&lt;br /&gt;        {&lt;br /&gt;            string key = CreateHashKey(connectionString, storedProcedure);&lt;br /&gt;            IDataParameter[] cachedParameters = (IDataParameter[])(paramCache[key]);&lt;br /&gt;            return CloneParameters(cachedParameters);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        // Gets if a given stored procedure on a specific connection string has a cached parameter set&lt;br /&gt;        public static bool IsParameterSetCached(string connectionString, string storedProcedure)&lt;br /&gt;        {&lt;br /&gt;            string hashKey = CreateHashKey(connectionString, storedProcedure);&lt;br /&gt;            return paramCache[hashKey] != null;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        // create the hash key based on connectionstring and stored procedure name&lt;br /&gt;        private static string CreateHashKey(string connectionString, string storedProcedure)&lt;br /&gt;        {&lt;br /&gt;            return connectionString + ":" + storedProcedure;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The above shared class is for caching and accessing the cached parameters.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;HashTable&lt;/strong&gt; – Used to store the array of parameters based on hash key. It is used as a cache.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;CreateHashKey&lt;/strong&gt; – Caching the Sql parameters based on hash key formed from connectionstring and stored procedure name.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;AddParameterSetToCache&lt;/strong&gt; – Cache the parameters in HashTable based on connectionstring and stored procedure name.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;CloneParameters&lt;/strong&gt; – Get the clone of cached parameters.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;GetCachedParameterSet&lt;/strong&gt; – Get the parameters from the HashTable(Cache) based on HashKey.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;IsParameterSetCached&lt;/strong&gt; – Used to check whether parameters already cached based on hashkey.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Clear &lt;/strong&gt;– Clear the HashTable(Cache)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Customer Class:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #0000FF"&gt;&lt;br /&gt;public class Customer&lt;br /&gt;    {&lt;br /&gt;&lt;br /&gt;        #region C# 3.0 Automatic Properties&lt;br /&gt;&lt;br /&gt;        public long CustomerID&lt;br /&gt;        {&lt;br /&gt;            get;&lt;br /&gt;            set;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public string Name&lt;br /&gt;        {&lt;br /&gt;            get;&lt;br /&gt;            set;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        #endregion&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;How to use ParameterCache shared class:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #0000FF"&gt;&lt;br /&gt;//Add the Customer Information to Customer Table&lt;br /&gt;        public void AddCustomer(Customer cust, string connectionString)&lt;br /&gt;        {&lt;br /&gt;            SqlConnection conn = null;&lt;br /&gt;            SqlCommand cmd = null;&lt;br /&gt;            SqlParameter[] param = null;&lt;br /&gt;            string spName = "AddCustomer";&lt;br /&gt;&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                conn = new SqlConnection(connectionString);&lt;br /&gt;                cmd = new SqlCommand(spName, conn);&lt;br /&gt;                cmd.CommandType = CommandType.StoredProcedure;&lt;br /&gt;&lt;br /&gt;                param = GetParameters(cust, connectionString, spName);&lt;br /&gt;&lt;br /&gt;                conn.Open();&lt;br /&gt;                cmd.ExecuteNonQuery();&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;            catch (Exception)&lt;br /&gt;            {&lt;br /&gt;                throw;&lt;br /&gt;            }&lt;br /&gt;            finally&lt;br /&gt;            {&lt;br /&gt;                if (conn != null &amp;&amp; conn.State == ConnectionState.Open)&lt;br /&gt;                    conn.Close();&lt;br /&gt;                &lt;br /&gt;                if (cmd != null)&lt;br /&gt;                    cmd.Dispose();&lt;br /&gt;&lt;br /&gt;                param = null;&lt;br /&gt;            }&lt;br /&gt;           &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The above method is to add the records to the customer table. For that you have to prepare the parameters for stored procedure. GetParameters() method used to prepare the parameters.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #0000FF"&gt;&lt;br /&gt;&lt;br /&gt;        // Prepare the Sql Parameters for Adding Customer&lt;br /&gt;        // Get the Clone parameters if already cached based on connectionstring and store procedure name&lt;br /&gt;        // Otherwise create the new Sql parameter array and then add to cache for next time use.&lt;br /&gt;        private SqlParameter[] GetParameters(Customer cust, string connectionString, string storeProcedure)&lt;br /&gt;        {&lt;br /&gt;            SqlParameter[] param = null;&lt;br /&gt;&lt;br /&gt;            if (ParameterCache.IsParameterSetCached(connectionString, storeProcedure))&lt;br /&gt;            {&lt;br /&gt;                param = (SqlParameter[])ParameterCache.GetCachedParameterSet(connectionString, storeProcedure);&lt;br /&gt;&lt;br /&gt;                param[0].Value = cust.CustomerID;&lt;br /&gt;                param[1].Value = cust.Name;&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                param = new SqlParameter[2];&lt;br /&gt;&lt;br /&gt;                param[0] = new SqlParameter("@CustomerID", SqlDbType.BigInt, 8);&lt;br /&gt;                param[0].Value = cust.CustomerID;&lt;br /&gt;                param[1] = new SqlParameter("@Name", SqlDbType.VarChar, 50);&lt;br /&gt;                param[1].Value = cust.Name;&lt;br /&gt;&lt;br /&gt;                ParameterCache.AddParameterSetToCache(connectionString, storeProcedure, param);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            return param;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The above method is for returning array of sql parameters. First it checks the cache, if already exists then get the parameters from the cache. And then assign the values of clone sql parameters.&lt;br /&gt;If not exists, create the new array of sql parameters and add prepared parameters into cache for next time use.&lt;br /&gt;&lt;br /&gt;Only first time call, it takes some time to cache the parameters. Next call onwards prepare the sql parameters faster.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br /&gt; You can get better performance on caching the sql parameters if you are calling the stored procedure frequently.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-3404077708787070644?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/3404077708787070644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=3404077708787070644' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/3404077708787070644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/3404077708787070644'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/12/caching-sql-parameters-in-cnet.html' title='Caching Sql Parameters in C#.Net'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-5603732078489405655</id><published>2007-12-25T04:48:00.000-08:00</published><updated>2007-12-25T05:55:13.744-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PLINQ'/><category scheme='http://www.blogger.com/atom/ns#' term='C#.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='Framework'/><title type='text'>Parallel Extensions to .Net Framework - PLINQ</title><content type='html'>Microsoft released the CTP version of Parallel Extensions to the .Net Framework.&lt;br /&gt;With the use of parallel extensions, we can write the program that using MULTI core (Dual,QUAD,etc) processors.&lt;br /&gt;&lt;br /&gt;Usually we write the program for single core processor, so our hardware resources are not fully utilized. But with the use of Parallel Extensions, we can utilize the hardware resources effectively.&lt;br /&gt;&lt;br /&gt;You can download the CTP version of Parallel Extension &lt;a href="https://connect.microsoft.com/site/sitehome.aspx?SiteID=516"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Parallel Extensions provide several new ways to express parallelism in your code: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Declarative data parallelism(PLINQ)&lt;/strong&gt; - Parallel Language Integrated Query (or Parallel LINQ) is an implementation of LINQ-to-Objects that executes queries in parallel, scaling to utilize the available cores and processors of the machine. Because queries are declarative, you are able to express what you want to accomplish, rather than how you want to accomplish it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Imperative data parallelism&lt;/strong&gt; - Parallel Extensions also contains mechanisms to express common imperative data-oriented operations such as for and foreach loops, automatically dividing the work in the loop to run on parallel hardware.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Imperative task parallelism&lt;/strong&gt; - Rather than using data to drive parallelism, Parallel Extensions enables you to express potential parallelism via expressions and statements that take the form of lightweight tasks. Parallel Extensions schedules these tasks to run on parallel hardware and provides capabilities to cancel and wait on tasks. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Code(PLINQ):&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1. Create the new Project from VS 2008.&lt;br /&gt;2. Reference the System.Threading.dll from the Parallel Extension installation path.&lt;br /&gt;3. Create the static class like the following.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #0000FF"&gt;&lt;br /&gt;    class ValidNumbers&lt;br /&gt;    {&lt;br /&gt;        //Sequential Method&lt;br /&gt;        public static int SequentialValidNumberCount(IEnumerable&amp;lt;string&amp;gt; list)&lt;br /&gt;        {&lt;br /&gt;            return list.Where(n =&gt; IsNumber(n)).Count();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        //Parallel Method&lt;br /&gt;        public static int ParallelValidNumberCount(IEnumerable&amp;lt;string&amp;gt; list)&lt;br /&gt;        {&lt;br /&gt;            return list.AsParallel().Where(n =&gt; IsNumber(n)).Count();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        //validate the string whether its number&lt;br /&gt;        private static bool IsNumber(string input)&lt;br /&gt;        {&lt;br /&gt;            return !(Regex.IsMatch(input, "[^0-9]"));&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;In the Static class, we have declared the two methods for calculating the number of integers in the array.&lt;br /&gt;&lt;br /&gt;SequentialValidNumberCount - This is sequential way of running the method. It uses single core.&lt;br /&gt;&lt;br /&gt;ParallelValidNumberCount - This is Parallel way of running the method. AsParallel() is the extension method. It uses all the core in the processor.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Calling code:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #0000FF"&gt;&lt;br /&gt;&lt;br /&gt; string[] arr = { "1", "a", "2" };&lt;br /&gt;            int count = 0;&lt;br /&gt;&lt;br /&gt;            //Sequetial way of accessing&lt;br /&gt;            count =  ValidNumbers.SequentialValidNumberCount(arr);&lt;br /&gt;&lt;br /&gt;            //Parallel way of accessing&lt;br /&gt;            count = ValidNumbers.ParallelValidNumberCount(arr);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Parallel Method runs faster than sequential method because it uses all the core in the processor. You can see the difference between two in the Task Manager Performance monitor.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-5603732078489405655?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/5603732078489405655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=5603732078489405655' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/5603732078489405655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/5603732078489405655'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/12/parallel-extensions-to-net-framework.html' title='Parallel Extensions to .Net Framework - PLINQ'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-464771100709153713</id><published>2007-12-19T01:42:00.000-08:00</published><updated>2007-12-19T01:58:08.167-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Dotnet'/><category scheme='http://www.blogger.com/atom/ns#' term='C#.Net'/><title type='text'>Exception Hunter from Red Gate</title><content type='html'>Redgate introduced the new tool called Exception Hunter. It hunts the exception in the code.&lt;br /&gt;&lt;br /&gt;By using this tool, we can avoid unhandled exception or application crashes at run time. It anaylsis the code that you have written, generates the reports of possible exceptions will occur in the code.&lt;br /&gt;&lt;br /&gt;So We can find the unhandle exception easily in the development cycle itself instead in QA cycle.&lt;br /&gt;&lt;br /&gt;You can download it &lt;a href="http://www.red-gate.com/products/index.htm"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-464771100709153713?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/464771100709153713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=464771100709153713' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/464771100709153713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/464771100709153713'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/12/exception-hunter-from-red-gate.html' title='Exception Hunter from Red Gate'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-914138225348985239</id><published>2007-12-18T08:44:00.000-08:00</published><updated>2007-12-18T09:15:15.418-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='Dotnet'/><category scheme='http://www.blogger.com/atom/ns#' term='AJAX'/><category scheme='http://www.blogger.com/atom/ns#' term='C#.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>ASP.NET 3.5 Extensions CTP Preview</title><content type='html'>Microsoft released the CTP version of ASP.Net 3.5 Extensions. It provides the added features to framework 3.5. you can download it &lt;a href="http://asp.net/downloads/3.5-extensions/"&gt;here&lt;/a&gt; .&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ASP.Net 3.5 Extensions contains:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. MVC (Model View Controller): &lt;/strong&gt;&lt;br /&gt;   Its provides clear seperation of presention and logic . And also it provides URL rerouting option.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Dynamic Data Support : &lt;/strong&gt;&lt;br /&gt;   It provides faster creation of dynamic data driven websites. &lt;br /&gt;&lt;br /&gt;you can create simple data driven websites like&lt;br /&gt;1. Create Dynamic Data Web Application Project&lt;br /&gt;2. Add LINQ To SQL Class Item to the project.&lt;br /&gt;3. Drag the required tables from database into LINQ to SQL Class.&lt;br /&gt;4. Set the EnableTemplates to True in Web.Config like&lt;br /&gt;&lt;strong&gt; &amp;lt;dynamicData dataContextType="" enableTemplates="true"&amp;gt;&lt;/strong&gt;&lt;br /&gt;5. Run the Application to view, add, edit and delete the table records.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. Silverlight Controls:&lt;/strong&gt;&lt;br /&gt;   It provides additional silverlight controls.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4. AJAX Enhancements:&lt;/strong&gt;&lt;br /&gt;   It provides browser history support for the AJAX ASPX pages.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;5. ADO.Net Entity Framework:&lt;/strong&gt;&lt;br /&gt;   It prviodes entity framework that enables the deveopers to model the database closely to real world application.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-914138225348985239?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/914138225348985239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=914138225348985239' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/914138225348985239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/914138225348985239'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/12/aspnet-35-extensions-ctp-preview.html' title='ASP.NET 3.5 Extensions CTP Preview'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-8720902053634697929</id><published>2007-12-10T09:02:00.000-08:00</published><updated>2007-12-11T08:30:02.932-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='C# 3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>C# 3.0 Extension Methods</title><content type='html'>Microsoft introduced the cool and nice features of Extension Methods in C# 3.0.&lt;br /&gt;You can add the methods to the any type like string, int, Collection or even customer class.&lt;br /&gt;&lt;br /&gt;you have define and implement the extended methods in static class only and method also static. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Extension Class and Methods:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #0000FF"&gt;&lt;br /&gt; static class MyExtensionMethods&lt;br /&gt;    {&lt;br /&gt;&lt;br /&gt;        // this methods apply to all string type&lt;br /&gt;        public static bool IsNumber(this string input)&lt;br /&gt;        {&lt;br /&gt;            return !(Regex.IsMatch(input, "[^0-9]"));&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        // this methods apply to all type that derive from object type&lt;br /&gt;        public static bool IsExistsIn(this object obj, IEnumerable list)&lt;br /&gt;        {&lt;br /&gt;            foreach (object o in list)&lt;br /&gt;            {&lt;br /&gt;                if (o.Equals(obj))&lt;br /&gt;                    return true;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            return false;&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Using Extension Methods:&lt;/strong&gt;&lt;br /&gt;&lt;div style="color: #0000FF"&gt;&lt;br /&gt; string number = "45";&lt;br /&gt;            bool isNum = false;&lt;br /&gt;&lt;br /&gt;            // returns true&lt;br /&gt;           isNum = number.IsNumber();&lt;br /&gt;&lt;br /&gt;           // returns false&lt;br /&gt;           isNum = "45fg".IsNumber();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            bool isExists = false;&lt;br /&gt;           string[] arr = { "Ayyanar", "Senthil", "Vaithy" };&lt;br /&gt;&lt;br /&gt;            // returns true&lt;br /&gt;           isExists = "Ayyanar".IsExistsIn(arr);&lt;br /&gt;&lt;br /&gt;           // returns false&lt;br /&gt;           isExists = "Ayya".IsExistsIn(arr);&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now we will see how to use this extension methods to custom class object.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Class:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #0000FF"&gt;&lt;br /&gt;class Customer&lt;br /&gt;    {&lt;br /&gt;&lt;br /&gt;        #region Automatic Properties&lt;br /&gt;&lt;br /&gt;        public long CustomerID&lt;br /&gt;        {&lt;br /&gt;            get;&lt;br /&gt;            set;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public string Name&lt;br /&gt;        {&lt;br /&gt;            get;&lt;br /&gt;            set;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        #endregion&lt;br /&gt;&lt;br /&gt;        #region Override Methods&lt;br /&gt;&lt;br /&gt;        public override bool Equals(object obj)&lt;br /&gt;        {&lt;br /&gt;            Customer c = (Customer)obj;&lt;br /&gt;&lt;br /&gt;            if (c.CustomerID == this.CustomerID &amp;&amp; c.Name == this.Name)&lt;br /&gt;                return true;&lt;br /&gt;            else&lt;br /&gt;                return false;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public override int GetHashCode()&lt;br /&gt;        {&lt;br /&gt;            return base.GetHashCode();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        #endregion&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Using Extension Method for Customer Object:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #0000FF"&gt;&lt;br /&gt;   // C# 3.0 Collection Initializers&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;           List&amp;lt;Customer&amp;gt; custList = new List&amp;lt;Customer&amp;gt;{&lt;br /&gt;                                        new Customer { CustomerID = 1, Name = "Ayyanar" },&lt;br /&gt;                                        new Customer { CustomerID = 2, Name = "Senthil" },&lt;br /&gt;                                        new Customer { CustomerID = 3, Name = "Vaithy" }&lt;br /&gt;                                        };&lt;br /&gt;&lt;br /&gt;            // C# 3.0 Object Initializers&lt;br /&gt;           Customer c = new Customer { CustomerID = 1, Name = "Ayyanar" };&lt;br /&gt;&lt;br /&gt;           // return true&lt;br /&gt;           isExists = c.IsExistsIn(custList);&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-8720902053634697929?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/8720902053634697929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=8720902053634697929' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/8720902053634697929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/8720902053634697929'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/12/c-30-extension-methods.html' title='C# 3.0 Extension Methods'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-1608611919051102729</id><published>2007-12-09T23:20:00.000-08:00</published><updated>2008-12-09T19:19:29.442-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='C# 3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>C# 3.0 Collection Initializers</title><content type='html'>C# 3.0 has a nice feature of creating collection of objects in a simple way like C# 3.0 object initializers.&lt;br /&gt; &lt;br /&gt;&lt;strong&gt;Class Structure:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; class Customer&lt;br /&gt;    {&lt;br /&gt;       &lt;br /&gt;        #region Automatic Properties&lt;br /&gt;&lt;br /&gt;        public long CustomerID&lt;br /&gt;        {&lt;br /&gt;            get;&lt;br /&gt;            set;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public string Name&lt;br /&gt;        {&lt;br /&gt;            get;&lt;br /&gt;            set;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        #endregion&lt;br /&gt;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Conventional Method:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;// C# 3.0 object Initialization Method&lt;br /&gt;Customer custmObj1 = new Customer { CustomerID = 1, Name = "Ayyanar" };&lt;br /&gt;Customer custmObj2 = new Customer { CustomerID = 2, Name = "Senthil" };&lt;br /&gt;Customer custmObj3 = new Customer { CustomerID = 3, Name = "Vaithy" };&lt;br /&gt;&lt;br /&gt;//List of Customer&lt;br /&gt;&lt;br /&gt;List&amp;lt;Customer&amp;gt; listCust = new List&amp;lt;Customer&amp;gt;();&lt;br /&gt;&lt;br /&gt;// Adding the object into the Customer List&lt;br /&gt;listCust.Add(custmObj1);&lt;br /&gt;listCust.Add(custmObj2);&lt;br /&gt;listCust.Add(custmObj3);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C# 3.0 :&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; List&amp;lt;Customer&amp;gt; listStr = new List&amp;lt;Customer&amp;gt; { &lt;br /&gt;                                        new Customer{CustomerID = 1, Name = "Ayyanar"},&lt;br /&gt;                                        new Customer{CustomerID = 2, Name = "Senthil"},&lt;br /&gt;                                        new Customer{CustomerID = 3, Name = "Vaithy"},&lt;br /&gt;                                        };&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_YdNJ_-Tbfnw/R1zs46E_xMI/AAAAAAAAAAk/Vc3LrtcEAsw/s1600-h/Collection+Iniatialization.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_YdNJ_-Tbfnw/R1zs46E_xMI/AAAAAAAAAAk/Vc3LrtcEAsw/s400/Collection+Iniatialization.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5142245336957306050" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In single statement, we can populate the multiple object into the list.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-1608611919051102729?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/1608611919051102729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=1608611919051102729' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/1608611919051102729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/1608611919051102729'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/12/c-30-collection-initializers.html' title='C# 3.0 Collection Initializers'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_YdNJ_-Tbfnw/R1zs46E_xMI/AAAAAAAAAAk/Vc3LrtcEAsw/s72-c/Collection+Iniatialization.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-8792146117522695927</id><published>2007-12-09T18:26:00.000-08:00</published><updated>2007-12-09T18:55:10.908-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='C# 3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>C# 3.0: Anonymous Types</title><content type='html'>C# 3.0 Anonumous types is a nice feature. you can create the object for the class without declaring the class, private variables or properties. suppose if you want to create a class with two properties, &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Conventional Method:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;class Customer&lt;br /&gt;    {&lt;br /&gt;&lt;br /&gt;        #region Automatic Properties&lt;br /&gt;&lt;br /&gt;        public long CustomerID&lt;br /&gt;        {&lt;br /&gt;            get;&lt;br /&gt;            set;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public string Name&lt;br /&gt;        {&lt;br /&gt;            get;&lt;br /&gt;            set;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        #endregion&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Object Creation:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Customer custm = new Customer();&lt;br /&gt;custm.CustomerID = 1;&lt;br /&gt;custm.Name = "Rich";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C# 3.0 Anonymous Types:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;you can create a object for the anonymous class(No Class Name) with property initialization.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;var cust = new { CustomerID = 1, Name = "Rich" };&lt;br /&gt;&lt;br /&gt;The above code will create the object for Anonymous class with two properties of CustomerID and Name.&lt;br /&gt;&lt;br /&gt;Visual Studio provides the intellisense for anonymous object without compiling.&lt;br /&gt;&lt;br /&gt;Compiler will create the class(Anonymous) for anonymous object like(not exact) the below.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class Anonymous_1&lt;br /&gt;    {&lt;br /&gt;        &lt;br /&gt;        public long CustomerID&lt;br /&gt;        {&lt;br /&gt;            get;&lt;br /&gt;            set;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public string Name&lt;br /&gt;        {&lt;br /&gt;            get;&lt;br /&gt;            set;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;if you create the multiple anonymous object, compiler will use the same class if type of the property is same.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;var cust = new { CustomerID = 1, Name = "Rich" };&lt;br /&gt;&lt;br /&gt;var cust1 = new { CustomerID = 2, Name = "David" };&lt;br /&gt;&lt;br /&gt;From the above code, compiler will use the same anonymous class for creating the object.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;var cust = new { CustomerID = 1, Name = "Rich" };&lt;br /&gt;&lt;br /&gt;var cust1 = new { CustomerID = "2", Name = "David" };&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;From the above code, compiler will use the two class for each object because second anonymous object of property CustomerID type differ from first object.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Once you created the anonymous type object, you can't reassign the value for the property of anonymous type object.&lt;br /&gt;&lt;br /&gt;cust.CustomerID  = 3;&lt;br /&gt;&lt;br /&gt;The above code will throw compiler error.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-8792146117522695927?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/8792146117522695927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=8792146117522695927' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/8792146117522695927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/8792146117522695927'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/12/c-30-anonymous-types.html' title='C# 3.0: Anonymous Types'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-8617501060813590361</id><published>2007-12-09T05:19:00.000-08:00</published><updated>2008-12-09T19:19:29.814-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Agile'/><category scheme='http://www.blogger.com/atom/ns#' term='SCRUM'/><title type='text'>SCRUM Development Process - Agile Project Management</title><content type='html'>Here we are going to discuss about Agile Project Management with SCRUM. Nowadays most of companies started to using SCRUM development process. Its practice to follow in project/product development framework. This process is most suited to the project that requirements frequently changing and adding more enhancements.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Definition:&lt;/strong&gt;&lt;br /&gt;An iterative, incremental process for developing any product or managing any work. It produces a potentially shippable set of functionality at the end of every iteration.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Attributes of SCRUM process:&lt;/strong&gt;&lt;br /&gt;• An agile process to manage and control development work. &lt;br /&gt;• A wrapper for existing engineering practices.&lt;br /&gt;• A team-based approach to iteratively, incrementally develop systems and products when requirements are rapidly changing &lt;br /&gt;• A process that controls the chaos of conflicting interests and needs.&lt;br /&gt;• A way to improve communications and maximize co-operation. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;SCRUM Process Diagram:&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_YdNJ_-Tbfnw/R1vtY6E_xJI/AAAAAAAAAAM/wtoj3jJFZn4/s1600-h/SCRUM.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_YdNJ_-Tbfnw/R1vtY6E_xJI/AAAAAAAAAAM/wtoj3jJFZn4/s320/SCRUM.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5141964411736409234" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Detailed SCRUM Process Diagram:&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_YdNJ_-Tbfnw/R1vtkqE_xKI/AAAAAAAAAAU/dTWyF0bHRwE/s1600-h/SCRUM-DETAIL.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_YdNJ_-Tbfnw/R1vtkqE_xKI/AAAAAAAAAAU/dTWyF0bHRwE/s320/SCRUM-DETAIL.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5141964613599872162" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Terminology:&lt;/strong&gt;• &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Product Owner&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;o This is the person who makes decisions about features that will be added to the project&lt;br /&gt;o This person may be a customer, but can be a person in the company who acts as the customer’s representative&lt;br /&gt;o This person will be the ultimate judge of a projects successful completion&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;SCRUM Master&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;o Equivalent to a project manager for a small project or a team lead on a larger project, with a size of 4 to 8 people.&lt;br /&gt;o The scrum master ensures that the rules of scrum are followed&lt;br /&gt; By the development team&lt;br /&gt; By management and customers &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Product Backlog&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;o The product backlog is generally equivalent to the requirements document in traditional projects&lt;br /&gt;o Features are added to the product backlog and include the following information&lt;br /&gt; ID&lt;br /&gt; Priority&lt;br /&gt;• Multiple priority scales can be used&lt;br /&gt;o 1-5&lt;br /&gt;o Showstopper, Major, Minor, Trivial&lt;br /&gt; Description&lt;br /&gt; Preliminary Hour Estimate&lt;br /&gt;o It can also contain&lt;br /&gt; Customer/Contract information&lt;br /&gt; Requirement Owner&lt;br /&gt; Anticipated Version&lt;br /&gt; Assigned Development Team&lt;br /&gt; Assigned QA Team&lt;br /&gt; Feature Status&lt;br /&gt;o Features are prioritized by the Product Owner&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;SPRINT&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;• A Sprint is a single development cycle&lt;br /&gt;• Developers work as a team during a sprint to complete tasks that are defined at the beginning of the sprint&lt;br /&gt;• Typical duration of 4 weeks, but is flexible&lt;br /&gt;• The output of the sprint should be completed software modules that provide demonstrable capability&lt;br /&gt;• The entire team is responsible for all of the tasks on the sprint&lt;br /&gt;o If someone finishes their tasks early, they help others complete the remaining tasks&lt;br /&gt;• The end date of the sprint is fixed.  Tasks must get dropped from a sprint rather than move the end date&lt;br /&gt;• Sprint Planning Meeting:&lt;br /&gt;• Occurs at the beginning of sprint&lt;br /&gt;• Features from the product backlog are broken down into smaller tasks and assigned to developers&lt;br /&gt;• Estimates refined by developers based on implementation responsibility&lt;br /&gt;• Attended by development team, product owner and the scrum master&lt;br /&gt;The scrum master runs the meeting&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Sprint Backlog&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;• The Sprint Backlog tracks the progress of an individual sprint&lt;br /&gt;• All of the tasks that were defined during the sprint planning meeting are listed on the sprint backlog&lt;br /&gt;• The estimates for tasks are stored and updated on this document&lt;br /&gt;• Daily SCRUM:&lt;br /&gt;• Daily progress meeting&lt;br /&gt;o Attended by the development team&lt;br /&gt;o Run by the scrum master&lt;br /&gt;• Three questions answered by each team member&lt;br /&gt;o What did you do yesterday?&lt;br /&gt;o What is keeping you from accomplishing your tasks?&lt;br /&gt;o What do you plan on doing today?&lt;br /&gt;• Estimates are updated on the sprint backlog&lt;br /&gt;o Number of hours worked are logged&lt;br /&gt;o Hours remaining are “re-estimated”&lt;br /&gt;• Information gathered at these meetings can be used to track progress of tasks&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;SCRUM Rules&lt;/strong&gt;&lt;br /&gt;• The dates are fixed&lt;br /&gt;o If tasks are not going to be finished, they are dropped from this iteration&lt;br /&gt;o Priorities are VERY important&lt;br /&gt;• No Feature Creep&lt;br /&gt;o Features may not be added to a sprint by the product owner after the Sprint Planning Meeting&lt;br /&gt;o Exception – the burn down chart shows that all tasks will be completed early and the team agrees to take on the next task from the product backlog&lt;br /&gt;o Sprints can be cancelled and restarted by the product owner if there is a high priority need&lt;br /&gt;• All tasks must be TESTED to be complete&lt;br /&gt;o Developers must COMPLETE the tasks&lt;br /&gt;o The next sprint will start immediately after this one ends, so there will not be time for revisiting this task&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Challenges&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;o It takes practice by the entire team&lt;br /&gt;o People tend to over-commit during the Sprint Planning Meeting&lt;br /&gt;o Proper estimates must include time for:&lt;br /&gt; Design&lt;br /&gt; Development&lt;br /&gt; Reviews (Design and Code)&lt;br /&gt; Unit Test Creation&lt;br /&gt; Testing&lt;br /&gt; Integration&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-8617501060813590361?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/8617501060813590361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=8617501060813590361' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/8617501060813590361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/8617501060813590361'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/12/scrum-development-process-agile-project.html' title='SCRUM Development Process - Agile Project Management'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_YdNJ_-Tbfnw/R1vtY6E_xJI/AAAAAAAAAAM/wtoj3jJFZn4/s72-c/SCRUM.JPG' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-1241703557557113511</id><published>2007-12-04T20:50:00.000-08:00</published><updated>2007-12-06T05:12:04.662-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='C# 3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>C# 3.0 : Object Initialization</title><content type='html'>Usually object can be initialized by passing value to contructor. if we want to initialize the differnt property value in different situation, we need to create a more constructor for all the situation.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Conventional Method:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;class Customer&lt;br /&gt;{&lt;br /&gt;#region Constructors&lt;br /&gt;&lt;br /&gt;public Customer() {}&lt;br /&gt;&lt;br /&gt;public Customer(long customerID)&lt;br /&gt;{&lt;br /&gt;CustomerID = customerID;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public Customer(long customerID, string name)&lt;br /&gt;{&lt;br /&gt;CustomerID = customerID;&lt;br /&gt;Name = name;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#endregion&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#region Automatic Properties&lt;br /&gt;&lt;br /&gt;public long CustomerID&lt;br /&gt;{&lt;br /&gt;get;&lt;br /&gt;set;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public string Name&lt;br /&gt;{&lt;br /&gt;get;&lt;br /&gt;set;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#endregion&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Initialization:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Customer custObj = new Customer(1);&lt;br /&gt;Customer custObj1 = new Customer(1, "Pankaj");&lt;br /&gt;Customer custObj2 = new Customer();&lt;br /&gt;custObj2.CustomerID = 1;&lt;br /&gt;custObj2.Name = "Pankaj";&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C# 3.0:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;But in C# 3.0, no need to create too much contructor for initializatoin. you can initialize the property without creating the constructor.&lt;br /&gt;&lt;br /&gt;class Customer&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;#region Automatic Properties&lt;br /&gt;&lt;br /&gt;public long CustomerID&lt;br /&gt;{&lt;br /&gt;get;&lt;br /&gt;set;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public string Name&lt;br /&gt;{&lt;br /&gt;get;&lt;br /&gt;set;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#endregion&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Initialization:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Customer custSingle = new Customer { CustomerID = 1 };&lt;br /&gt;Customer cust = new Customer { CustomerID = 1, Name = "Pankaj" };&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Constructor and Initialization:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;you can also call the constructor and initialize the property at the same time.&lt;br /&gt;&lt;br /&gt;Customer custConst = new Customer(1) { CustomerID = 2, Name = "Pankaj" };&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First call the constructor and then initialize the property.&lt;br /&gt;&lt;br /&gt;So finally CustomerID value will be 2 instead of 1.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-1241703557557113511?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/1241703557557113511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=1241703557557113511' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/1241703557557113511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/1241703557557113511'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/12/c-30-object-initialization.html' title='C# 3.0 : Object Initialization'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-2278010103142878983</id><published>2007-11-23T22:30:00.000-08:00</published><updated>2007-11-29T10:31:54.033-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='C# 3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>C#.Net 3.0 features: Automatic Property</title><content type='html'>Microsoft introduced the new features in C#.Net 3.0 called &lt;strong&gt;Automatic Property&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;No more need to declare the private variable for properties. It automatically creates the private variables for properties. But still you can use the conventional way of declaring the private variables to initialize the specific default value to private variable and also other calculation purposes.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Conventional Method:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;class Customer&lt;br /&gt;    {&lt;br /&gt;        private long m_customerID;&lt;br /&gt;        private string m_name;&lt;br /&gt;&lt;br /&gt;        public string CustomerID&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                return m_customerID;&lt;br /&gt;            }&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                m_customerID = value;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public string Name&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                return m_name;&lt;br /&gt;            }&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                m_name = value;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C#.Net 3.0 New Method:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;class Customer&lt;br /&gt;    {&lt;br /&gt;&lt;br /&gt;        public string CustomerID&lt;br /&gt;        {&lt;br /&gt;            get;&lt;br /&gt;            set;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public string Name&lt;br /&gt;        {&lt;br /&gt;            get;&lt;br /&gt;            set;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;From the above declaration, you can find that the no private variable declared.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You may ask the question what would be default value for property. Here is the answer.&lt;br /&gt;&lt;br /&gt;1. Value type = 0&lt;br /&gt;2. Reference type = null&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-2278010103142878983?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/2278010103142878983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=2278010103142878983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/2278010103142878983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/2278010103142878983'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/11/cnet-30-features-automatic-property.html' title='C#.Net 3.0 features: Automatic Property'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-3419451863537626222</id><published>2007-11-22T22:12:00.000-08:00</published><updated>2007-11-29T10:34:14.708-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Stored Procedure'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><category scheme='http://www.blogger.com/atom/ns#' term='Performance'/><title type='text'>Performance difference between EXEC and sp_executesql</title><content type='html'>I presumed that you already know about the execution plan. Sometimes we may come to situation to use &lt;strong&gt;Dynamic SQL&lt;/strong&gt; instead of &lt;strong&gt;direct T-SQL.&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;If we are using &lt;strong&gt;Direct T-SQL &lt;/strong&gt;(not dynamic) in stored procedure, SQL Server reused execution plan from the cache. i.e. SQL Server will not compile the Stored Procedure again.&lt;br /&gt;&lt;br /&gt;If we are using dynamic sql in stored procedure, SQL Server may not use the execution plan. It will recreate the execution plan every time with different string of SQL.&lt;br /&gt;&lt;br /&gt;So, we have to think about the performance while using dynamic sql.&lt;br /&gt;&lt;br /&gt;To execute the dynamic SQL in stored procedure, we have to use the following way.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. EXEC (Non- parameterized)&lt;br /&gt;2. sp_executesql (Parameterized)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There will be performance difference between above two.&lt;br /&gt;&lt;br /&gt;Execution plan will not be created until you execute the dynamic sql. If you execute the dynamic sql using EXEC, execution plan will be created for every execution even values only changing. If you use sp_executesql, SQL Server Optimizer will try to use same execution plan. Because dynamic sql string will be the same, values only going to change. So it will be treated as Stored Procedure having input parameters.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Use the following query to test,&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CREATE TABLE [dbo].[Item]&lt;br /&gt;(&lt;br /&gt; ID INT&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;INSERT INTO [dbo].[Item](ID) VALUES (1)&lt;br /&gt;INSERT INTO [dbo].[Item](ID) VALUES (2)&lt;br /&gt;&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DBCC FREEPROCCACHE&lt;br /&gt;&lt;br /&gt;DECLARE @ItemID INT&lt;br /&gt;DECLARE @Query NVARCHAR(200)&lt;br /&gt;&lt;br /&gt;SET @Query = 'SELECT * FROM [dbo].[Item] WHERE ID = '&lt;br /&gt;&lt;br /&gt;SET @ItemID = 1&lt;br /&gt;EXEC( @Query +  @ItemID)&lt;br /&gt;&lt;br /&gt;SET @ItemID = 2&lt;br /&gt;EXEC( @Query +  @ItemID)&lt;br /&gt;&lt;br /&gt;SET @Query = 'SELECT * FROM [dbo].[Item] WHERE ID = @ID'&lt;br /&gt;&lt;br /&gt;SET @ItemID = 1&lt;br /&gt;EXEC sp_executesql @Query, N'@ID INT', @ID = @ItemID&lt;br /&gt;&lt;br /&gt;SET @ItemID = 2&lt;br /&gt;EXEC sp_executesql @Query, N'@ID INT', @ID = @ItemID&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To view the execution plan, use the following query.&lt;br /&gt;&lt;br /&gt;SELECT usecounts, sql FROM sys.syscacheobjects&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Results:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;UseCounts    SQL&lt;br /&gt;&lt;br /&gt;1           SELECT * FROM [dbo].[Item] WHERE ID = 1&lt;br /&gt;2           (@ID INT)SELECT * FROM [dbo].[Item] WHERE ID = @ID&lt;br /&gt;1           SELECT usecounts, sql FROM sys.syscacheobjects&lt;br /&gt;1           SELECT * FROM [dbo].[Item] WHERE ID = 2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;From the results, executed the dynamic sql using sp_executesql uses same execution plan. EXEC create the execution plan every time.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Always try to use sp_executesql to execute the dynamic sql to improve the performance.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-3419451863537626222?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/3419451863537626222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=3419451863537626222' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/3419451863537626222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/3419451863537626222'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/11/performance-difference-between-exec-and.html' title='Performance difference between EXEC and sp_executesql'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-4113435860104639944</id><published>2007-10-09T03:51:00.000-07:00</published><updated>2007-11-29T10:35:10.182-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Avoiding  Global temporary table problems between databases</title><content type='html'>Global temp tables are used to store values that can be used across the stored procedures in particular application run. it will disappears when application is stopped.&lt;br /&gt;&lt;br /&gt;Global temp tables are created by following query.&lt;br /&gt;&lt;br /&gt;CREATE TABLE [dbo].[##Temp] (ID INT)&lt;br /&gt;&lt;br /&gt;if global temp tables are created  and used &lt;br /&gt;by single instance only, problem(creating 2 temp table with same name) will not occur. The problem will occur when another instance creating same temp table at same time. This problem will occur on same database or another database with same name of temp table creation.&lt;br /&gt;&lt;br /&gt;To avoid this confliction, we will use GUID with temp table name. But this method is more constlier and difficult to handle. Because temp table name is so lengthy.&lt;br /&gt;&lt;br /&gt;EXEC ( 'CREATE TABLE [dbo].[##Temp' + CONVERT(VARCHAR, NEWID()) + ' ] (ID INT)' )&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Otherwise we can use identity value of some table with temp table name.&lt;br /&gt;&lt;br /&gt;EXEC ( 'CREATE TABLE [dbo].[##Temp' + @ID + ' ] (ID INT)' )&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The above method will solve the problem even multiple instances running on same database. Because each instance will create unique identity value and using that id with temp table name.&lt;br /&gt;&lt;br /&gt;Again problem will occur between different databases creating the same temp table with same identity value. This problem will occur when the multiple instance running on different databases at the same time. Because each instance trying to create temp table  with same name. &lt;br /&gt;&lt;br /&gt;To avoid confliction between different databases, use DB_ID() or DB_NAME() with temp table name.&lt;br /&gt;&lt;br /&gt;EXEC ( 'CREATE TABLE [dbo].[##Temp' + CONVERT(VARCHAR, DB_ID()) + @ID + ' ] (ID INT)' )&lt;br /&gt;&lt;br /&gt;EXEC ( 'CREATE TABLE [dbo].[##Temp' + CONVERT(VARCHAR, DB_NAME()) + @ID + ' ] (ID INT)' )&lt;br /&gt;&lt;br /&gt;Because DB_ID() or DB_NAME() will be unique to each database.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-4113435860104639944?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/4113435860104639944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=4113435860104639944' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/4113435860104639944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/4113435860104639944'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/10/avoiding-global-temporary-table.html' title='Avoiding  Global temporary table problems between databases'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-7966022237619404321</id><published>2007-09-11T02:55:00.000-07:00</published><updated>2007-12-10T18:51:41.619-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Adding Documentation for Enum Members in .Net</title><content type='html'>To add the documentation for each member of enum, we have to add the &lt;summary&gt;&lt;/summary&gt; tag for each members like the below.&lt;br /&gt;&lt;br /&gt;CODE:&lt;br /&gt;-----&lt;br /&gt;&lt;br /&gt;&lt;I&gt;&lt;br /&gt;    ///&amp;lt;summary&amp;gt;&lt;br /&gt;    /// Priority&lt;br /&gt;    ///&amp;lt;/summary&amp;gt;&lt;br /&gt;    public enum Priority&lt;br /&gt;    {&lt;br /&gt;         ///&amp;lt;summary&amp;gt;&lt;br /&gt;        /// Low Priority&lt;br /&gt;        ///&amp;lt;/summary&amp;gt;&lt;br /&gt;        Low,&lt;br /&gt;         ///&amp;lt;summary&amp;gt;&lt;br /&gt;        /// Medium Priority&lt;br /&gt;        ///&amp;lt;/summary&amp;gt;&lt;br /&gt;        Medium,&lt;br /&gt;         ///&amp;lt;summary&amp;gt;&lt;br /&gt;        /// High Priority&lt;br /&gt;        ///&amp;lt;/summary&amp;gt;&lt;br /&gt;        High,&lt;br /&gt;&lt;br /&gt;       &lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;/I&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-7966022237619404321?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/7966022237619404321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=7966022237619404321' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/7966022237619404321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/7966022237619404321'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/09/adding-documentation-for-enum-members.html' title='Adding Documentation for Enum Members in .Net'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-2588246075180855969</id><published>2007-09-03T23:14:00.000-07:00</published><updated>2007-11-29T10:36:38.060-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Randomly selecting records from the Table - SQL Server</title><content type='html'>If you would like to retrieve the 10 records randomly, you have to use either RAND() or NEWID() function.&lt;br /&gt;&lt;br /&gt;RAND():&lt;br /&gt;------&lt;br /&gt;SELECT TOP 10 EmployeeID, RAND() AS RNumber FROM dbo.Employee ORDER BY 2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NEWID():&lt;br /&gt;--------&lt;br /&gt;SELECT TOP 10 EmployeeID FROM dbo.Employee ORDER BY NEWID()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The above 2 methods of retrieving the records from the table have own mertis and demerits.&lt;br /&gt;&lt;br /&gt;RAND() methods will give same sample of records in every run. so you have to come with own logic to produce different random number for every records.&lt;br /&gt;&lt;br /&gt;NEWID() method give easy solution for the above problem. The idea behind this method is having of unique identifier for each rows. SQL Server maintain this for every rows.&lt;br /&gt;&lt;br /&gt;There will be performance overhead problem in this approach when you are using this for TABLE having more records. Because its scans through whole table. you can avoid the full scan by limiting the records using WHERE condition.&lt;br /&gt;&lt;br /&gt;SQL Server 2005.&lt;br /&gt;---------------&lt;br /&gt;&lt;br /&gt;SQL Server 2005 provides new option to get the records randonly. That new option is &lt;br /&gt;TABLESAMPLE. This keyword is used with FROM clause. This approach could not read &lt;br /&gt;through entire table. its just take the sample records instead of scanning entire &lt;br /&gt;table.&lt;br /&gt;&lt;br /&gt;TABLESAMPLE:&lt;br /&gt;------------&lt;br /&gt;&lt;br /&gt;SELECT EmployeeID FROM dbo.Employee TABLESAMPLE (50 ROWS)&lt;br /&gt;&lt;br /&gt;SELECT EmployeeID FROM dbo.Employee TABLESAMPLE (50 PERCENT)&lt;br /&gt;&lt;br /&gt;SELECT TOP 10 EmployeeID FROM dbo.Employee TABLESAMPLE (50 ROWS)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The above first query will not return 50 rows exactly.&lt;br /&gt;First it will convert the ROWS into percent. And the select the records randomly.&lt;br /&gt;&lt;br /&gt;Selection of random records based on DATA pages(8K) for that table instead of rows identifier. so it will not produce the expected result.&lt;br /&gt;&lt;br /&gt;To get the expected result, we have to use the TOP clause in the select query. The TOP #(number) should be less than selection of records specified in the TABLESAMPLE.&lt;br /&gt;&lt;br /&gt;Sometimes,Even this appraoch will not produce the expected result.so you have to use this approach carefully with your logic.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-2588246075180855969?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/2588246075180855969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=2588246075180855969' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/2588246075180855969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/2588246075180855969'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/09/randomly-selecting-records-from-table.html' title='Randomly selecting records from the Table - SQL Server'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-8040850590537870943</id><published>2007-07-26T05:16:00.000-07:00</published><updated>2007-11-29T10:37:09.168-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#.Net'/><title type='text'>Handling Database NULL in .Net while using SqlParameter (.Net 2.0)</title><content type='html'>If you want to set the NULL for database column while inserting or updating, normal “null”  OR “DBNULL.value”  is not suitable.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C# code:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;param[0] = new SqlParameter("@MiddleName", SqlDbType.VarChar , 50);&lt;br /&gt;param[0].Value = null;&lt;br /&gt;&lt;br /&gt;param[0] = new SqlParameter("@MiddleName", SqlDbType.VarChar , 50);&lt;br /&gt;param[0].Value = DBNULL.value;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you are using Sqlparameter for passing the parameter value to stored procedure, the above null types does not support. It will throw an error like  “Parameter @MiddleName not specified.”.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C# code:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;using System.Data.SqlTypes;&lt;br /&gt;&lt;br /&gt;param[0] = new SqlParameter("@MiddleName", SqlDbType.VarChar , 50);&lt;br /&gt;param[0].Value = &lt;strong&gt;SqlString.Null;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The above code will execute properly without any error.&lt;br /&gt;&lt;br /&gt;The same way you have to use for other data types like&lt;br /&gt;&lt;strong&gt;DataTime --&gt; SqlDateTime.Null&lt;br /&gt;int32    --&gt; SqlInt32.Null, etc&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-8040850590537870943?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/8040850590537870943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=8040850590537870943' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/8040850590537870943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/8040850590537870943'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/07/handling-database-null-in-net-while.html' title='Handling Database NULL in .Net while using SqlParameter (.Net 2.0)'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-3059825864049157634</id><published>2007-07-24T06:16:00.000-07:00</published><updated>2007-11-29T10:37:34.988-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='Performance'/><title type='text'>Performance Difference between Parameterized and Non-Parameterized call to Stored Procedure</title><content type='html'>You can call the sql stored procedures either with parameter ( using SqlParameter) or normal sql string ( using EXEC dbo.spName). There will be significant performance difference between two.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Non – Parameterized Stored Procedure Call:&lt;/strong&gt;&lt;br /&gt;If you call the stored procedure using EXEC ( like normal sql query) with command type as TEXT, execution plan is not reused. SQL Server caches the execution plan for SP to reuse. If you used EXEC for calling SP, new execution plan will create for every different string of EXEC statement. It will not reuse the execution plan from the SQL Server cache. SQL Server normally doing the parsing, optimizing, compiling process while creating the new execution plan.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Parameterized Stored Procedure Call:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;If you call Stored procedure with Parameters ( example: SqlParameter) with Command Type as Stored Procedure, execution plan of the SP is reused again instead of creating the new one with different parameters.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Use Parameterized method of calling when you call the stored procedure instead of EXEC method. You can’t feel the performance when few call to stored procedure. You can feel this performance difference when more calls to stored procedure (10000 calls frequently).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-3059825864049157634?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/3059825864049157634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=3059825864049157634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/3059825864049157634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/3059825864049157634'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/07/performance-difference-between.html' title='Performance Difference between Parameterized and Non-Parameterized call to Stored Procedure'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-8987123651348862411</id><published>2007-07-08T21:09:00.000-07:00</published><updated>2007-11-29T10:38:38.112-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>OUTPUT Command in SQL Server 2005</title><content type='html'>The output parameter that can be used in stored procedures. This is about returning effected data on a table with a few feature in SQL Server 2005.&lt;br /&gt;SQL Server 2000&lt;br /&gt;&lt;br /&gt;A simple question for you. If you want to retrieve last inserted identity value what do you do? Obviously SCOPE_IDENTITY() or @@IDENTITY will be your answer. There is a small different between these too, which I am not going to discuss right now. Even though both will satisfy the current requirement, I will use SCOPE_IDENTITY(), which is the correct one.&lt;br /&gt;&lt;br /&gt;CREATE TABLE TempTable&lt;br /&gt; (&lt;br /&gt; ID INT IDENTITY(1 , 1)&lt;br /&gt; , Code VARCHAR(25)&lt;br /&gt; , Name VARCHAR(50)&lt;br /&gt; , Salary Numeric(10 , 2)&lt;br /&gt; ) &lt;br /&gt;INSERT INTO TempTable ( Code , Name , Salary )&lt;br /&gt;  VALUES ( 'A001' , 'John' , 100 )&lt;br /&gt;INSERT INTO TempTable ( Code , Name , Salary )&lt;br /&gt;  VALUES ( 'A002' , 'Ricky' , 200 )&lt;br /&gt;&lt;br /&gt;SELECT SCOPE_IDENTITY() AS LastInsertID&lt;br /&gt;&lt;br /&gt;However, this will only valid when you need the last inserted ID. A Problem arises when you need the last updated or deleted data. In SQL Server 2000, you don't have any other option other than writing a trigger or triggers to capture them via inserted and/or deleted tables.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sqlservercentral.com/columnists/dasanka/3041.asp"&gt;more...&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-8987123651348862411?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/8987123651348862411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=8987123651348862411' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/8987123651348862411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/8987123651348862411'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/07/output-command-in-sql-server-2005.html' title='OUTPUT Command in SQL Server 2005'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-455843345641271020</id><published>2007-07-04T16:55:00.000-07:00</published><updated>2007-11-29T10:39:38.528-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Features in Microsoft SQL Server 2008 CTP</title><content type='html'>Microsoft is making a series of announcements at Tech*Ed related to SQL Server 2008 -- previously codenamed "Katmai". I've got some details on some of the new features including the MERGE statement, Table Valued Parameters, Change Data Capture and the Declarative Management Framework. There should also be a download of the June CTP available inside Connect.&lt;br /&gt;&lt;a href="http://www.sqlteam.com/article/microsoft-announces-sql-server-2008"&gt;more...&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Other Links:&lt;br /&gt;&lt;a href="http://sqlserver-qa.net/blogs/sql2008/archive/2007/06/11/661.aspx"&gt;Four Pillar&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-455843345641271020?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/455843345641271020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=455843345641271020' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/455843345641271020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/455843345641271020'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/07/features-in-microsoft-sql-server-2008.html' title='Features in Microsoft SQL Server 2008 CTP'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-4340368034067968759</id><published>2007-06-27T23:19:00.000-07:00</published><updated>2007-11-29T10:40:18.120-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='Outlook'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='Office'/><title type='text'>Outlook with .NET 2.0</title><content type='html'>For accessing the outlook and its features you have to add reference of Microsoft Outlook 11.0 object library Version 9.2 (COM component) to your project.This COM component provides various objects through we can access the outlook.&lt;br /&gt;&lt;br /&gt;   1.      Microsoft.Office.Interop.Outlook.Application&lt;br /&gt;   2.      Microsoft.Office.Interop.Outlook.Explorer&lt;br /&gt;   3.      Microsoft.Office.Interop.Outlook.Inspector&lt;br /&gt;   4.      Microsoft.Office.Interop.Outlook.MAPIFolder&lt;br /&gt;   5.      Microsoft.Office.Interop.Outlook.MailItem&lt;br /&gt;   6.      Microsoft.Office.Interop.Outlook.AppointmentItem&lt;br /&gt;   7.      Microsoft.Office.Interop.Outlook.TaskItem&lt;br /&gt;   8.      Microsoft.Office.Interop.Outlook.ContactItem &lt;br /&gt;&lt;br /&gt;   &lt;a href="http://www.c-sharpcorner.com/UploadFile/Nimusoft/OutlookwithNET06262007081811AM/OutlookwithNET.aspx"&gt;more...&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-4340368034067968759?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/4340368034067968759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=4340368034067968759' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/4340368034067968759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/4340368034067968759'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/06/outlook-with-net-20.html' title='Outlook with .NET 2.0'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-8576022645988290506</id><published>2007-06-18T04:30:00.000-07:00</published><updated>2007-11-29T10:40:51.389-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Debugging SQL Server 2005 Stored Procedures in Visual Studio</title><content type='html'>With Microsoft SQL Server 2000 it was possible to debug stored procedures from directly within Query Analyzer (see Debugging a SQL Stored Procedure from inside SQL Server 2000 Query Analyzer for more information). With SQL Server 2005, however, this functionality was moved out of SQL Server Management Studio and into the Visual Studio IDE. Using this technique, it is possible to step into your stored procedures, one statement at a time, from within Visual Studio. It is also possible to set breakpoints within your stored procedures' statements and have these breakpoints hit when debugging your application &lt;a href="http://aspnet.4guysfromrolla.com/articles/051607-1.aspx"&gt;more...&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-8576022645988290506?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/8576022645988290506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=8576022645988290506' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/8576022645988290506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/8576022645988290506'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/06/debugging-sql-server-2005-stored.html' title='Debugging SQL Server 2005 Stored Procedures in Visual Studio'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-4572482700676537439</id><published>2007-06-05T05:39:00.000-07:00</published><updated>2007-11-29T10:41:18.656-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>New XML Capabilities in SQL Server 2005</title><content type='html'>Prior to SQL Server 2005, if developers wanted to convert XML data to relational data, they had to use combinations of the stored procedure sp_xml_preparedocument and the OPENXML function. While still valid, this methodology introduces some overhead. SQL 2005 provides native support for the XML data type, and new methods to directly parse and read the data &lt;a href="http://www.setfocus.com/technicalarticles/sql-server-2005-xml.aspx"&gt;more&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-4572482700676537439?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/4572482700676537439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=4572482700676537439' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/4572482700676537439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/4572482700676537439'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/06/new-xml-capabilities-in-sql-server-2005.html' title='New XML Capabilities in SQL Server 2005'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-6901019971738532435</id><published>2007-05-29T22:00:00.000-07:00</published><updated>2007-11-29T10:41:55.539-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Passing a Table to A Stored Procedure in SQL Server 2005</title><content type='html'>In this article, he trying to present a solution to the above scenario by using XML as the format to pass a table to a stored procedure. The CALLER can transform the table (Query result) to an XML variable and pass to the stored procedure. The CALLEE can either convert the XML parameter back to a TABLE variable or directly use XQuery on the XML variable.&lt;a href="http://www.sqlservercentral.com/columnists/jSebastian/2977.asp"&gt; more&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-6901019971738532435?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/6901019971738532435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=6901019971738532435' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/6901019971738532435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/6901019971738532435'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/05/passing-table-to-stored-procedure-in.html' title='Passing a Table to A Stored Procedure in SQL Server 2005'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-6762267402152003780</id><published>2007-05-14T02:29:00.000-07:00</published><updated>2007-11-29T10:42:29.423-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Enable CLR in SQL Server 2005</title><content type='html'>if you need to run CLR object in SQL Server 2005. you have to enable the CLR option.&lt;br /&gt;I have used following command to enable the CLR features.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;EXEC sp_configure 'show advanced options' , '1';&lt;br /&gt;go&lt;br /&gt;reconfigure;&lt;br /&gt;go&lt;br /&gt;EXEC sp_configure 'clr enabled' , '1'&lt;br /&gt;go&lt;br /&gt;reconfigure;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-6762267402152003780?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/6762267402152003780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=6762267402152003780' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/6762267402152003780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/6762267402152003780'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/05/enabel-clr-in-sql-server-2005.html' title='Enable CLR in SQL Server 2005'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-2753077067857179842</id><published>2007-04-24T05:14:00.000-07:00</published><updated>2007-04-24T05:21:10.565-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='viewstate'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='compression'/><title type='text'>Compressing ViewState in ASP.Net 2.0</title><content type='html'>Developers often worry about performance of their web sites. Every developer wants that his web site be optimized for good performance. There are several factors affecting performance of your web site and one of them is ViewState. In this article he going to show a way by which you can compress ViewState thus improving the performance. &lt;a href="http://www.dotnetbips.com/articles/22d33d11-1a75-42c8-bbf6-ca1a345d3fcf.aspx"&gt;more..&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-2753077067857179842?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/2753077067857179842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=2753077067857179842' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/2753077067857179842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/2753077067857179842'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/04/compressing-viewstate-in-aspnet-20.html' title='Compressing ViewState in ASP.Net 2.0'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-117578119506639897</id><published>2007-04-05T06:50:00.000-07:00</published><updated>2007-11-29T10:43:06.740-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Deployment'/><category scheme='http://www.blogger.com/atom/ns#' term='C#.Net'/><title type='text'>Deployment:Customize User Interfaces and Pass User Input to Installer Classes</title><content type='html'>This article going to demonstrate how to customize your MSI install to prompt the user for some information and then pass this information to an installer class.  This can be useful when needing to do something during an install based on the user input.There are two key parts to this process the first is the addition of a custom user interface dialog and the second is passing whatever information is entered into the new user interface  to the installer class in order to do something with this information during installation. &lt;a href="http://www.c-sharpcorner.com/UploadFile/ddoedens/CustomUI11102005042556AM/CustomUI.aspx"&gt;more..&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-117578119506639897?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/117578119506639897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=117578119506639897' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/117578119506639897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/117578119506639897'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/04/deploymentcustomize-user-interfaces.html' title='Deployment:Customize User Interfaces and Pass User Input to Installer Classes'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-117577755728017589</id><published>2007-04-05T05:50:00.000-07:00</published><updated>2007-11-29T10:43:44.296-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Office'/><title type='text'>ASP.Net 2.0: Export GridView to Excel</title><content type='html'>The focus of the article is the Export to Excel functionality - the Gridview and it's data binding are only for demonstrating the Export functionality.&lt;br /&gt;The code fragments for the Export to Excel functionality below are not linked to the backend structure and can be re-used across projects for the common functionality provided. In this article, we will assume you are starting with a web page which holds a GridView named GridView1. The GridView in our demo code is bound to a table named "ContactPhone" in a SQL Express database. The following code which exports the databound GridView to Excel is not dependent on the specific databindings and can be used without changes for your scenario. &lt;a href="http://www.c-sharpcorner.com/UploadFile/DipalChoksi/exportxl_asp2_dc11032006003657AM/exportxl_asp2_dc.aspx"&gt;more..&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-117577755728017589?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/117577755728017589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=117577755728017589' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/117577755728017589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/117577755728017589'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/04/aspnet-20-export-gridview-to-excel.html' title='ASP.Net 2.0: Export GridView to Excel'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-117566422876360829</id><published>2007-04-03T22:22:00.000-07:00</published><updated>2007-11-29T10:44:19.962-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSRS'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>SQL Server 2005 Reporting Services</title><content type='html'>Included with SQL Server 2005 is a group of interrelated applications, collectively known as SQL Server Reporting Service (SSRS). SSRS includes all the development and management pieces necessary to publish end user reports in HTML, PDF, Excel, and CSV formats. Originally released as a SQL 2000 separate add on that could be downloaded from the web, all the Reporting Server pieces are now bundled in SQL 2005. With Reporting Services built into SQL, expect to see product adoption rise quickly. Microsoft's accounting package, Solomon, will soon discontinue use of Crystal Reports in favor of SSR. &lt;a href="http://www.databasejournal.com/features/mssql/article.php/3573361"&gt;more..&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-117566422876360829?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/117566422876360829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=117566422876360829' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/117566422876360829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/117566422876360829'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/04/sql-server-2005-reporting-services.html' title='SQL Server 2005 Reporting Services'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-117566281844731036</id><published>2007-04-03T21:57:00.000-07:00</published><updated>2007-11-29T10:44:39.288-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Data partitioning in SQL Server 2005</title><content type='html'>Data partitioning, a new feature added to SQL Server 2005, provides a way to divide large tables and indexes into smaller parts. By doing so, it makes the life of a database administrator easier when doing backups, loading data, recovery and query processing.Data partitioning improves the performance, reduces contention and increases availability of data.A Table can be partitioned based on any column in the table. Microsoft defines that column as the partition key. &lt;a href="http://www.databasejournal.com/features/mssql/article.php/3638236"&gt;more..&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-117566281844731036?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/117566281844731036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=117566281844731036' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/117566281844731036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/117566281844731036'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2007/04/data-partitioning-in-sql-server-2005.html' title='Data partitioning in SQL Server 2005'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-114812499559416969</id><published>2006-05-20T04:34:00.000-07:00</published><updated>2007-11-29T10:45:00.343-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net 2.0'/><title type='text'>Coding Model and Compilation in ASP.NET 2.0</title><content type='html'>In ASP.NET 1.x ,application are compiled on first request or in a batch mode on startup. The disadvantage is we had to deploy uncompiled code into our production server. ASP.NET 2.0 offers new compilation method that precompiles source code into binary assemblies for deployment. Pre-Compiled application consists of assemblies ,resources which of no value for an attacker. PreCompiled application is more secure than an normal ASP.NET application. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.c-sharpcorner.com/Code/2005/May/CodingandCompilation.asp"&gt;&lt;br /&gt;Read more &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-114812499559416969?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/114812499559416969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=114812499559416969' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/114812499559416969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/114812499559416969'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2006/05/coding-model-and-compilation-in-aspnet.html' title='Coding Model and Compilation in ASP.NET 2.0'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-114716064448226007</id><published>2006-05-09T00:41:00.000-07:00</published><updated>2007-11-29T10:45:38.682-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='its me'/><title type='text'>Pass first MCP Exam</title><content type='html'>Today is great day for me... I passed the first MCP Exam...(070-315)...&lt;br /&gt;&lt;br /&gt;Enjoyable day......&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-114716064448226007?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/114716064448226007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=114716064448226007' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/114716064448226007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/114716064448226007'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2006/05/pass-first-mcp-exam.html' title='Pass first MCP Exam'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-114441273220902139</id><published>2006-04-07T05:21:00.000-07:00</published><updated>2007-11-29T10:45:55.950-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>An Introduction to the Service Broker (SQL Server 2005)</title><content type='html'>Service Broker is a new feature in SQL Server 2005 that allows you to build reliable, asynchronous, message-based applications using extensions to the T-SQL language to process and manage queues. Since queues are managed in the database, you enjoy all the capabilities of a typical database system, which is transactions, reliability, performance, scalability etc.&lt;br /&gt;&lt;br /&gt;Service Broker can easily scale to many thousands of messages per second and it can guarantee message ordering among the various messages and even across different reading threads! All message processing is transacted and thus recoverable. Finally, message processing and posting can be distributed across many participating SQL Servers, thus ensuring true scalability and performance. In the subsequent sections of this article, we will see the building blocks of Service Broker and write our first, simple message based application.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sqlservercentral.com/columnists/sSampath/anintroductiontotheservicebroker.asp"&gt; Read more...&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-114441273220902139?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/114441273220902139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=114441273220902139' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/114441273220902139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/114441273220902139'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2006/04/introduction-to-service-broker-sql.html' title='An Introduction to the Service Broker (SQL Server 2005)'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-114403967956359575</id><published>2006-04-02T21:29:00.000-07:00</published><updated>2007-11-29T10:46:10.121-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='its me'/><title type='text'>Flashback....(MNGP Polytechnic--1st Year Tour)</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/7979/512/1600/25.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/7979/512/320/25.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;The above photo was took in Nilgiris. This is Feb.14. At that time most of guys weared the green shirt especially kalai.&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/7979/512/1600/37.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/7979/512/320/37.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;This was really enjoyable moment. we stop the bus...then we dance by using bus audio systems.&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/7979/512/1600/4.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/7979/512/320/4.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;This was the hotel we stayed. we booked the two rooms in that hotel. And also I think we did camp fire in that hotel.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/7979/512/1600/34.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/7979/512/320/34.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;This was most memorable moment... one of the girl had a birthday during that period.&lt;br /&gt;I think date was Feb.13.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-114403967956359575?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/114403967956359575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=114403967956359575' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/114403967956359575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/114403967956359575'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2006/04/flashbackmngp-polytechnic-1st-year.html' title='Flashback....(MNGP Polytechnic--1st Year Tour)'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-114343556499135457</id><published>2006-03-26T20:50:00.000-08:00</published><updated>2007-11-29T10:46:22.331-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='its me'/><title type='text'>Flashback....(MNGP Polytechnic--3rd Year Tour)</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/7979/512/1600/31.0.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/7979/512/320/31.0.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;We had three wonderful young lecturer's...Vijayaragavan, PremKumar,Justin.&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/7979/512/1600/32.0.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/7979/512/320/32.0.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;Dance with lecturer..."Justin"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-114343556499135457?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/114343556499135457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=114343556499135457' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/114343556499135457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/114343556499135457'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2006/03/flashbackmngp-polytechnic-3rd-year_26.html' title='Flashback....(MNGP Polytechnic--3rd Year Tour)'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7925522.post-114327784254903809</id><published>2006-03-25T01:07:00.000-08:00</published><updated>2007-11-29T10:46:34.093-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='its me'/><title type='text'>Flashback....(MNGP Polytechnic--1st Year Tour)</title><content type='html'>&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/7979/512/320/28.0.jpg" border="0" /&gt;&lt;br /&gt;&lt;center&gt;&lt;br /&gt;Above photo taken in Ooty Garden... at the time we sang a most popular song.."Al-lello pullelo allea pullelo"....&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/7979/512/1600/30.jpg"&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/7979/512/320/30.jpg" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7925522-114327784254903809?l=ayyanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayyanar.blogspot.com/feeds/114327784254903809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7925522&amp;postID=114327784254903809' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/114327784254903809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7925522/posts/default/114327784254903809'/><link rel='alternate' type='text/html' href='http://ayyanar.blogspot.com/2006/03/flashbackmngp-polytechnic-1st-year.html' title='Flashback....(MNGP Polytechnic--1st Year Tour)'/><author><name>Ayyanar</name><uri>http://www.blogger.com/profile/05609935183415704483</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_YdNJ_-Tbfnw/TMKREURxWRI/AAAAAAAAAvc/gWaZ42PD1eY/S220/Ay.jpg'/></author><thr:total>2</thr:total></entry></feed>
