read data fail

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, everyone

when I try to run my asp.net application, if the database includes few data, it works well, but if the database becomes bigger (just includes thousands of records). I get the follow error message

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

Line 445: SqlCommand com=new SqlCommand(s,conn)
Line 446: conn.Open()
Line 447: SqlDataReader r=com.ExecuteReader(CommandBehavior.CloseConnection)

Line447 is the issue

Could anyone help? I do appreciate it

Sincerely

haiwe
 
Set the timeout of the command object to something long enough (or 0 for
infinity) to give the query enough time to run.

haiwen said:
Hello, everyone:

when I try to run my asp.net application, if the database includes few
data, it works well, but if the database becomes bigger (just includes
thousands of records). I get the follow error message:
Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.
 
Back
Top