reza
reza

Reputation: 29

How to fix the timeout period elapsed prior to completion of the operation or the server is not responding

I have asp.net web site with sql server data base. One of my table has about 400,000 records. My problem is that whenever I run my qoerys this error thrown in this line: mySqlDataAdapter.Fill(ds);

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding What is this error ? is it related to huge records of my table or options of my server. By the way, my server is localhost. Is there any one who help me?

Upvotes: 0

Views: 4141

Answers (1)

Kinexus
Kinexus

Reputation: 12904

It is likely that you need to set the CommandTimeout property

SqlCommand.CommandTimeout Property

However, I would question the size of your dataset if you need to return all 400k records. Perhaps implementing some kind of paging would help reduce the amount of data.

Upvotes: 2

Related Questions