• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1484
  • Last Modified:

Error HRESULT E_FAIL has been returned from a call to a COM component.

What could cause Error HRESULT E_FAIL has been returned from a call to a COM component ? I have a user group of 40 connecting to a SQL server and some have never had this error and some get this error atleast once per week. :-/
0
Jakelee80
Asked:
Jakelee80
  • 5
  • 4
  • 2
2 Solutions
 
zadeveloperCommented:
please send the code which establishes the sql connection.
0
 
Jakelee80Author Commented:
So its the SQL communication that would cause this?
0
 
iUsernameCommented:
Do you have a stack trace of where this error occurs?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
zadeveloperCommented:
No. May be the objects u are using if not using standard ado .net
0
 
Jakelee80Author Commented:
This has been showing up on my catch exceptions then sent to my error report database, its random so will have to wait till someone gets this error again to see if I can get that.
0
 
Jakelee80Author Commented:
oh here is what im using

using System;
using System.Collections.Generic;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using Microsoft.Win32;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Timers;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading;
using System.Data.SqlClient;
using System.Net;
using System.Net.Sockets;
using System.Net.NetworkInformation;
using System.IO;
using System.Reflection;
using System.Text.RegularExpressions;
using Outlook = Microsoft.Office.Interop.Outlook;
using System.DirectoryServices;
using System.Windows;
using System.Xml;
using System.Diagnostics.PerformanceData;
using System.Drawing.Imaging;
0
 
zadeveloperCommented:
This stack has nothing to do with SQL. Please post the code in the try block
0
 
iUsernameCommented:
The stack has nothing to do with SQL, but it might tell you if it happens during connection, during execution of a stored procedure, or whatever.

E_FAIL is too generic, so you need to know which line of code is throwing the exception (== stack tace).
0
 
zadeveloperCommented:
Hi iusername.

Typeing on my phone made my statment unclear. I was saying that the comment posted does not help us.

As I asked before please could we have a copy of the line of code that causes the com exception. And also the creation of the object.
0
 
Jakelee80Author Commented:
Only issue with that is I have more then 100 try / catch's, this is a fairly large program. But after gathering enough examples its been resolved, had to do with a network resource going offline.
0
 
Jakelee80Author Commented:
I got a good idea of what i needed to look for.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now