System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion

E

Ersin Gençtürk

we are getting :

System.Web.HttpUnhandledException: Exception of type
System.Web.HttpUnhandledException was thrown. --->
System.Data.SqlClient.SqlException: Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not
responding.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection
connection, CommandType commandType, String commandText, SqlParameter[]
commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String
connectionString, CommandType commandType, String commandText,
SqlParameter[] commandParameters)

errors , we are using sqldata access block 2.0 I have heard about some bugs
with connection opening / closing.I have changed the source code and put
connection close codes , but It didn't worked well.Is there any workaround
for this or any patch do you have ?
 
Joined
Sep 25, 2007
Messages
1
Reaction score
0
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior

While declaring the command object set the timeout property to some higher value.U can also set it it to 0 i.e. infinity.
SqlCommand cmd = new SqlCommand();
cmd.CommandTimeout=0;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top