Solved

Getting System.Runtime.InteropServices.COMException

Posted on 2014-01-15
3
743 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now