Posts

Showing posts from March, 2012

Handling nested transactions in Sql Server : Do rolling back out transaction roll back the inner committed transaction too ?????? big question...

SQL Server supports nesting transactions, however, writing nested transactions is usually not a good idea. The problem with nested transactions is that ROLLBACK and COMMIT statements affect multiple open transactions. Nested transactions usually occur when one stored procedure begins a transaction and then calls other procedures also using transactions before commiting the initial transaction. However, a single stored procedure could also have multiple transactions open at the same time. Despite the common belief that nested transaction problems can be mitigated by using named transactions, ROLLBACK and COMMIT statements don't behave as you would expect from the first glance. ROLLBACK TRANSACTION only maintains the name of the outermost transaction ; if you try rolling back any transaction except the outermost one, your statement will fail. The COMMIT TRAN statement, on the other hand will not fail; however, it will only commit the inner transaction, without releasing the exclus

free till software download for evaluation

Below is link to free till software download for evaluation. the full fledge version costs 49$ http://www.brothersoft.com/4pos-pos-retail-software-125359.html http://www.icrtouch.com/epos-software/touchpoint

Asp.net GridView : Populate dropdown list base on another drop down list in Editmode

This question was asked from me in interview in a company which works specifically in asp.net. And I was clueless about it. So, i thought that i will add this code in my blog. try this example: ASPX A B C RELEVANT CODE: private DataTable BindDropDownList(string field) { DataTable dt = new DataTable(); SqlConnection connection = new SqlConnection(GetConnectionString()); try { connection.Open(); string sqlStatement = "SELECT * FROM TableName WHERE Field1 = @Value"; SqlCommand sqlCmd = new SqlCommand(sqlStatement, connection); SqlDataAdapter sqlDa = new SqlDataAdapter(sqlCmd); sqlCmd.Parameters.AddWithValue("@Value", field); sqlDa.Fill(dt); } catch (System.Data.SqlCli

Nice services company website

__http://www.cloudconstruct.com/

How to speed up your system

I found very nice artical about how to speed up your system at http://www.howtogeek.com/107280/the-best-tips-for-speeding-up-your-windows-pc/?utm_source=newsletter&utm_medium=email&utm_campaign=040312 The Best Tips for Speeding Up Your Windows PC If your computer has started to slow down, there are many options for speeding it up. Below, we show you some of the best tips for speeding up your PC, some from previous HTG articles and some described here. Turn off Startup Programs When you install a program in Windows, it may add a small program that runs when Windows starts. After installing a lot of software, your boot up process could become slow. If there are programs you don’t use much, they probably don’t need to start every time Windows does. You can disable startup programs manually or use the free tool CCleaner. You can also use Soluto to speed up boot time. Clean Up Unnecessary Files on Your Computer As you use your computer, files collect in all kinds of pla

WCF Service Method Overloading

You all may have found this one out even earlier, but I found this out just a few days before. A WCF Service doe not allow normal method overloading , which is supported by .NET. It throws InvalidOPerationException. As for the reasons to why this happens is becasue WSDL is not a object orinted language and does not support these features of OOP. However overloading can be performed in WCF service in a roundabout way. [ServiceContract] interface ICalculator { [OperationContract(Name="AddTwoIntegers")] int Add(int a,int b) [OperationContract(Name="AddThreeIntegers")] int Add(int a,int b,int c) } The Name property in the OperationContract attribute enables the WSDL to make the difference between to same named methods here.

EnableViewStateMac in Asp.net

A view-state MAC is an encrypted version of the hidden variable that a page's view state is persisted to when the page is sent to the browser. When this property is set to true, the encrypted view state is checked to verify that it has not been tampered with on the client. Do not set this property in code. Set the EnableViewStateMac attribute using the @ Page directive in the .aspx file. When the page is requested, the dynamically generated class sets the property