Geeks With Blogs
Dheeman Dutta Just Another Blog..... June 2006 Entries
Asynchronous Commands
To enable asynchronous command , the firts step is to set the new Async attribute to true in the connection string, other wise an exception will be thrown.There can be three different ways to build asynchronous commands : nonblocking , polling,callback Nonblocking Commands // Start a non-blocking execution IAsyncResult iar = cmd.BeginEcecuteReader(); // Do something else meanwhile ........................ // Block the execution untill done SqlDataReader reader = cmd.EndExecuteReader(); //Process ......

Posted On Saturday, June 17, 2006 2:56 AM

Better way of using SqlCommand

Just came accross this following snippet.

using(SqlConnection conn = new SqlConnection)



SqlCommand cmd= new SqlCommand();




It's always better off cosing this inside a using block , bcoz what is the command thows an exception. Inside the using block the object wil always be disposed .


Posted On Saturday, June 17, 2006 2:41 AM

OR Mapping/Objects Spaces
I was trying to know what nHibernate does before installing it in my pc, when I cam accross the word “OR Mapping” (Object Relational Mapping). I found this link very useful to know a bit about OR Mapping,ObjectSpaces and nHibernate ......

Posted On Thursday, June 15, 2006 2:55 AM

StringCollection Vs ArrayList

I was thinking of using a StringCollection instead when I came accross this link


oops ...................



Posted On Tuesday, June 13, 2006 9:23 AM

Problem storing a Generic list object in Viewstate
I had an generic object that implements and I was just trying to store that object in ViewState. THis was where i first stumbled as it was giving me an error that basically tells that “Cannot serialze a generic list object”. After I did a bit of googling I found out that I need to make that object XmlSerializable inoder to be strored in Viewstate. I used the [serializable ] attribute on the class that I wanted to serialize. Still i was giving me error. After a quite prolonged step into ......

Posted On Tuesday, June 13, 2006 7:22 AM

Send Mail in ASp.NET 2.0

I was just trying to send a mail using ASP.NET 2.0. I was astonished to find out that the namespace used in ASP.NET 1.1 has for sending mail has become obsolete in ASP.NET 2.0

Previously it was System.Web.Mail, now it is System.Net.Mail

Posted On Wednesday, June 7, 2006 2:51 AM

Getting Values After Server.Transfer

I was just trying to get the values of the previous page after doing a Server.Transfer.

Page caller = (Page)Context.Handler


or CallingPage=(CallingPage) System.Web.HttpContext.Current.handler 

This Does the trick....


Posted On Wednesday, June 7, 2006 2:44 AM

Copyright © Dheeman Dutta | Powered by: