tags:

views:

18

answers:

1

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

[Microsoft][ODBC SQL Server Driver]Timeout expired

+1  A: 

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!

Kieren Johnstone
heyy m a beginner..can u please tell me how to use this command ? i mean where do i put this code ?
Arihant
Since you didn't tell us anything about the problem or even ask a question (you just posted an error), I don't know: if you have a command object created in your code (e.g. OdbcCommand or OleDbCommand), then set the CommandTimeout property on that command object. If you're doing it some other way, we'd need to know that.!
Kieren Johnstone
heyy it worked man...! !thanks a lot...:):)
Arihant