Error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.Asp Net SqlConnection

when we deal with huge amount of data, generally it may occur TIMEOUT problem... in those situations Take care of 3 things ( problem will be almost solved ) 1. put the connection timeout property in Connection string string connstring=" Data Source=localhost;User ID=sa; pwd=secret; Initial catalog=nothwind;connect timeout=900;"; 2. set the command timeout for the SqlCommand Object com.CommandTimeout=0; // this will makes Command to execute unlimited seconds 3. Now .... last but not the least... in the form unload function destroy the connection object conn.Dispose();

Post a Comment


Close Menu