Browse by Tags
All Tags »
.NET »
C# (RSS)
string sql = "some sql" ArrayList al = new ArrayList(); using (SqlConnection cn = new SqlConnection(cs)) using (SqlCommand cmd = new SqlCommand(sql, cn)) { cn.Open(); using (SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection...
using System ; using System.Data ; using System.Data.SqlClient ; using System.Web.Services ; namespace IamSimple.Service.WebServices { [WebService(Namespace = "http://royashbrook.com/ns" )] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1...
There are a ton of articles about using command cancel vs close when you are using a datareader. The idea is that it will make things faster if you cancel the command rather than just closing it if you have an occasion to interrupt the execution. If you...