Developing

Introduction

When trying to execute a procedure or a SQL command in ASP (classic ASP) or ASP.NET application (applications).

This error occurs in SQL Server.

Error

[Microsoft][ODBC SQL Server Driver] Query timeout expired

Solution

Try running the command that generates the error directly in the database.

If you run the query, try setting the object.CommandTimeout (syntax example in the references) to a value greater that returned by the same command executed directly from the database.

The default value for this property is 30 seconds. So if your query takes more than that, this is probably the problem.

Tente executar o comando que gera o erro diretamente no banco de dados. 

Se você executar a consulta, tente definir o object.CommandTimeout (exemplo de sintaxe nas referências) para um valor maior que retornou pelo mesmo comando executado directamente a partir do banco de dados. 

O valor padrão para esta propriedade é de 30 segundos. Então, se sua consulta usa mais do que isso, este é provavelmente o problema.

References

MSDN – ODBC driver returned following exception -1 Query timeout expired State:S1T00, Origin:[Microsoft][SQL Server Native Client 11.0] What are the steps to resolve?

MSDN – Troubleshooting: Timeout Expired

w3schools.com – ADO CommandTimeout Property

MSDN – SqlCommand.CommandTimeout Property

Also View

ASP.NET – Validation of viewstate MAC failed

ASP.NET – Firefox pedindo senha no IIS, IE e Chrome não

DNN – System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.

_____

Não se esqueça de deixar seu comentário, critica, elogio, dúvida e etc. Ele é muito importante para a melhoria do blog.
Do not forget to leave your comments, criticism, praise, questions, etc.. It is very important for improving the blog.

Advertisements

Comments on: "ASP – [Microsoft][ODBC SQL Server Driver] Query timeout expired" (2)

  1. […] ASP – [Microsoft][ODBC SQL Server Driver] Query timeout expired […]

  2. […] ASP – [Microsoft][ODBC SQL Server Driver] Query timeout expired […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: