Solved

Getting System.Runtime.InteropServices.COMException

Posted on 2014-01-15
3
780 Views
Last Modified: 2014-01-15
One of my windows app keeps getting this error below. Is it on just a sql time out right? Could it be anything else?

System.Runtime.InteropServices.COMException (0x80040E31): [Microsoft][ODBC SQL Server Driver]Timeout expired
   at ADODB.RecordsetClass.Open(Object Source, Object ActiveConnection, CursorTypeEnum CursorType, LockTypeEnum LockType, Int32 Options)
0
Comment
Question by:VBdotnet2005
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 39782803
The Connection object has a ConnectionTimeOut property that is set to 15 seconds by default. That time might have been shortened to something too low somewhere, or you might need to set it to a higher value in some situations.
0
 

Author Comment

by:VBdotnet2005
ID: 39782831
How can I set sql time out from code behind?

cmd.commandtimeout = 30 for 30 seconds?
0
 
LVL 40
ID: 39782981
Sorry, you did not specify anywhere that you were working with a web application. I have no idea how to deal with these things in ASP.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

806 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question