SQLCommand This morning I've encoutered a new problem. I have a big query (many INNER JOIN) that can't be run from query analyzer, but only from C# code. I developed and tested the SQL code using QA: it takes 4-20 min depending from table size to execute the query with no error. The same query executed using ADO.NET SqlCommand throw the error
"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."I've override SqlCommand.CommandTimeout value (default is 30 sec), Connection Timeout in Connection String seems to not solve the problem, but using a SqlCommand.CommandTimeout value bigger than the time elapsed by QA the C# code run with no exceptions and the data have been succesfully imported.

Commenti

Post più popolari

WelcomeMailchimp