Skip to main content

Posts

Showing posts from March, 2016

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated

Dear All, Once i got the issue for the timeout i fixed the following in the code " Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated" Its a vb code you can use it in C# also  Dim ObjCon As New SqlConnection ObjCon.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("conString").ConnectionString  ObjCon.Open()  ObjCmd.Connection = ObjCon  ObjCmd.CommandText = "Select * from your table" ' Its a trick only   ObjCmd.CommandTimeout = 0 Try                     ObjDr = ObjCmd.ExecuteReader                 Catch ex As Exception                     Response.Write("Following Error is there:" & ex.ToString() & "Kindly contact with IT Department")                 End Try If ObjDr.HasRows = True Then                     DataGrid1.DataSource = ObjDr                     DataGrid1.DataBind()  

How to Get All SQL Tables

Dear All, If you want to get all SQL tables through query use the following command SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' order by table_name I hope it save your time Regards Rashid Bilgrami