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

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?
 
C

Cor Ligthert[MVP]

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
 
M

michael

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.
 
C

Cor Ligthert[MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top