Information générale
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Network:
Windows 2008 Server
>>>Hi,
>>>
>>>I have a delete stored procedure that deletes records from multiple tables. There could be up to a few thousand records in a couple of those tables and a few hundred in a couple others.
>>>
>>>Unfortunately this is timing out. See the exception information below. Is there a way for me to increase the timeout period for this operation?
>>>
>>>System.Data.SqlClient.SqlException was unhandled by user code
>>> HResult=-2146232060
>>> Message=Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
>>> Source=.Net SqlClient Data Provider
>>> ErrorCode=-2146232060
>
>>If you can get to the DBDataAdapter then you could try 'dataAdaptor.CommandTimeout = x;'
>>
>>But since this is wrapped in MM I don't know whether that would be possible......
>
>Thanks Viv, I'll see if I can.
>
>Interesting that it failed the first couple times but then ran fine afterwards. I guess this gave SQL Server time to optimise the stored procedure.
Think I should have said 'dataAdapter.UpdateCommand.CommandTimeout'
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement