Sunday, August 15, 2010

Sreeram wins Indian Idol 5


City Boy Sreeram Chandra won the fifth season of the music reality show Indian Idol.


He was announced as the winner by Mr. Amitabh Bachchan.  


I feel he won because of peoples support from all over India. We should really Thank to all of them.  He is blessed with a good oppertunity and he should continue the journey as a Real Idol to all.  I really dont want to see him as another Anchor in Idol show or lost in the crowd like others.


Best of Luck Sreeram, Keep Rocking.

Monday, August 2, 2010

A very good example on Small mistakes, and their imapct on application

Yesterday we went to MySchools office. A big discussion was going on some database locking issue. It's interesting, their problem is application able to process two transaction successfully, from the third it is locking the table and execution is getting failed with timeout error. We asked to open the code, and we verified further. Finally I found the cause.  Close statement is missing in the code.  :-)

The Code which helped me to resolve the issue



private void OnPostInfoClick(object sender, System.EventArgs e)
{
string strId = UserId_TextBox.Text;
string strName = Name_TextBox.Text;

ASCIIEncoding encoding=new ASCIIEncoding();
string postData="userid="+strId;
postData += ("&username="+strName);
byte[] data = encoding.GetBytes(postData);

// Prepare web request...
HttpWebRequest myRequest =
(HttpWebRequest)WebRequest.Create("http://localhost/MyIdentity/Default.aspx");
myRequest.Method = "POST";
myRequest.ContentType="application/x-www-form-urlencoded";
myRequest.ContentLength = data.Length;
Stream newStream=myRequest.GetRequestStream();
// Send the data.
newStream.Write(data,0,data.Length);
newStream.Close();
}