Error: Timeout expired. The timeout period elapsed prior to comple

  • Thread starter Thread starter michael
  • Start date Start date
M

michael

I get the following error waiting for the completion of a query:

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


I need to increase the time allowed for execution of a query. I know that I
need to change the value of the CommandTimeout of the command object.

However, I'm using a TableAdapter. I can't get to the SelectCommand property
of the TableAdapter's Adapter.SelectCommand because this object doesn't seem
to be created until you fire the GetData or Fill method.

Does anyone know how to set the CommandTimeout property when that property
is somewhere in a TableAdapter?
 
Michael,

Are you sure that it is a command time out and not simple a connection
timeout.

A connection time is simple to set, just have a look at MSDN for that.

Cor
 
I tried setting the TimeOut in the connection. It seems that the adapter
doesn't inherit this value or it's over written. I seem to find in other
posts that I need to make the change in the adapter itself.
 
Hi,

Adapter.SelectCommand.Connection

cor

michael said:
I tried setting the TimeOut in the connection. It seems that the adapter
doesn't inherit this value or it's over written. I seem to find in other
posts that I need to make the change in the adapter itself.
 
Back
Top