0
votes

Microsoft OLE DB Provider for ODBC Drivers error '80040e31'

[Microsoft][ODBC SQL Server Driver]Timeout expired

1

1 Answers

1
votes

http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbcommand.commandtimeout.aspx

Try this:

commandObject.CommandTimeout = 120; // 120 seconds = 4 minutes

On your command object. You can also use a value of "0", which indicates no timeout, see the documentation.

Hope that helps!