"Timeout expired. " when using Fill Method
From: Shawn (Shawn_at_discussions.microsoft.com)
Date: 06/26/04
- Next message: Shawn: "RE: "Timeout expired. " when using Fill Method"
- Previous message: William \(Bill\) Vaughn: "Re: MDAC 2.1 and SQL Server 2000"
- Next in thread: Shawn: "RE: "Timeout expired. " when using Fill Method"
- Reply: Shawn: "RE: "Timeout expired. " when using Fill Method"
- Reply: William \(Bill\) Vaughn: "Re: "Timeout expired. " when using Fill Method"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 25 Jun 2004 17:19:01 -0700
Once a while, my web application gets this error message:
"System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."
>From the Stack Trace:
[SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataTable dataTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
In the webconfig file, I set the timeout = 3600.
Is there anything I should be aware of? The problem is that it works sometimes.
Thanks!
Here is my code: (it's quite simple.)
Dim myConnection As New SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("connStr1"))
Dim myCommand As New SqlCommand
With myCommand
.CommandType = CommandType.StoredProcedure
.CommandText = "dbo.spABC"
.Connection = myConnection
End With
Dim adp As New SqlClient.SqlDataAdapter
adp.SelectCommand = myCommand
Dim myTable As New DataTable
adp.Fill(myTable)
- Next message: Shawn: "RE: "Timeout expired. " when using Fill Method"
- Previous message: William \(Bill\) Vaughn: "Re: MDAC 2.1 and SQL Server 2000"
- Next in thread: Shawn: "RE: "Timeout expired. " when using Fill Method"
- Reply: Shawn: "RE: "Timeout expired. " when using Fill Method"
- Reply: William \(Bill\) Vaughn: "Re: "Timeout expired. " when using Fill Method"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|