Timeout expired error...
-
Hi all, In my Web Application, when I am filling a DataSet its giving following error. Regarding this I have searched in Forum. But they told about Command Object timeout property. But I am using Data Adapter. Error : 'Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding' My Code is : Public Sub FillDS(ByVal ds As DataSet, ByVal TblName As String, ByVal Qry As String) If Not ds.Tables(TblName) Is Nothing Then ds.Tables(TblName).Clear() DA = New SqlDataAdapter(Qry, Con) DA.Fill(ds, TblName) End Sub Please help me out.. Ramesh Sambari
Knowledge is like honey. Collect it, to make life sweet.
-
Hi all, In my Web Application, when I am filling a DataSet its giving following error. Regarding this I have searched in Forum. But they told about Command Object timeout property. But I am using Data Adapter. Error : 'Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding' My Code is : Public Sub FillDS(ByVal ds As DataSet, ByVal TblName As String, ByVal Qry As String) If Not ds.Tables(TblName) Is Nothing Then ds.Tables(TblName).Clear() DA = New SqlDataAdapter(Qry, Con) DA.Fill(ds, TblName) End Sub Please help me out.. Ramesh Sambari
Knowledge is like honey. Collect it, to make life sweet.
You need to set this property:
DA.SelectCommand.CommandTimeout
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
You need to set this property:
DA.SelectCommand.CommandTimeout
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
Thanks for your reply Manas, But Its not working... Earlier it was waiting for 30 sec. and giving TimeOut Expired. Now it is waiting for 1 minute 30 Sec. But same error is coming... Error : Sys.WebForms.PageRequestManagerTimeOutException: The Server request timed out. Please reply me... Ramesh Sambari
Knowledge is like honey. Collect it, to make life sweet.
-
Thanks for your reply Manas, But Its not working... Earlier it was waiting for 30 sec. and giving TimeOut Expired. Now it is waiting for 1 minute 30 Sec. But same error is coming... Error : Sys.WebForms.PageRequestManagerTimeOutException: The Server request timed out. Please reply me... Ramesh Sambari
Knowledge is like honey. Collect it, to make life sweet.
This error can be coming due to Connection Pooling in the database server. When you open a connection in your code, check whether you properly closed that connection. Check sp_who(if it is SQL Server) to see the number of connection opened in the database.