List Info

Thread: C-Sharp (C#) Group: Request Timeout




C-Sharp (C#) Group: Request Timeout
user name
2006-04-18 01:12:37
I sent a message about this before and figured it out with some help from friends.
 
Below is the code.
 

SqlConnection conn =

new SqlConnection("");

SqlDataReader rdr =

null;

conn.Open();

SqlCommand cmd =

new SqlCommand("first query";, conn);

rdr = cmd.ExecuteReader();

rdr.Close();

SqlCommand cmdd =

new SqlCommand("2nd query";, conn);

//Where the timeout is changed.

cmdd.CommandTimeout = 252000;

rdr = cmdd.ExecuteReader();

rdr.Close();

conn.Close();


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )