473,503 Members | 8,959 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))

1 New Member
I have a peculiar issue with a single user who is using a small application I created with VB.NET (VS 2010). The issue is only seen on his machine and it used to work before...The application is currently working fine for everyone else. The only change is that he recently upgraded from MS Office 2003 to 2010...this may offer a clue, but I have not been able to find a solution.

What the app does (in a nutshell):
Searches on our network for specific Excel files, then uses the ADODB CopyFromRecordset to get the values from specific cell(s) out of those files and copies them into an Excel workbook under it's control.

While the app is running on his machine, everything runs normally except that for pretty much all the files that it would normally copy values from it throws the exception message:
Expand|Select|Wrap|Line Numbers
  1. "No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))"
  2.  
Here is a snippet of the Try...Catch routines where the exception happens:
Expand|Select|Wrap|Line Numbers
  1. Try
  2.                             My.Application.DoEvents()
  3.                             intBATFileCount = intBATFileCount + 1
  4.                             lblFilesProcessed.Text = "Number of files processed: " & intBATFileCount
  5.                             rtbRunningLog.AppendText("Processing file: " & strBATFile & vbLf)
  6.                             'Grab SiteID and Last Write Time 
  7.                             wsData.Range("A" & intRowDataTarget).Value = My.Computer.FileSystem.GetName(strBATFile)
  8.                             wsData.Range("B" & intRowDataTarget).Value = IO.File.GetLastWriteTime(strBATFile).ToShortDateString
  9.                             strReference = wsTranslations.Range("A" & intTranslationsRefRow).Value
  10.  
  11.                             'Open ADO Connection to Excel file and leave it open until all data is extracted.
  12.                             Dim ADOConnection As New ADODB.Connection
  13.                             stCon = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & strBATFile & ";" & "Extended Properties='Excel 8.0;HDR=No'"
  14.                             ADOConnection.ConnectionString = stCon
  15.                             ADOConnection.Open()
  16.                             Do Until strReference = ""                  'Do until no more data to extract from currently connected file.             
  17.                                 My.Application.DoEvents()
  18.                                 'CONVERT INTEGER TO CHARACTER
  19.                                 ' If 1-26, then this is an easy conversion 
  20.                                 If intColDataTarget < 27 Then
  21.                                     strGetExcelColumn = Chr(intColDataTarget + 64)
  22.                                 Else
  23.                                     ' Now we have to account for AA-ZZ 
  24.                                     iBeg = intColDataTarget \ 26     ' Get the first letter 
  25.                                     iEnd = intColDataTarget Mod 26   ' Get the second letter 
  26.                                     If iEnd = 0 Then
  27.                                         ' If iEnd is 0, then it is Z, which should be 26 
  28.                                         iEnd = 26
  29.                                         '** you need to subtract 1 from the initial letter otherwise your lettering will be the next letter in the alphabet
  30.                                         iBeg = iBeg - 1
  31.                                     End If
  32.                                     strGetExcelColumn = Chr(iBeg + 64) & Chr(iEnd + 64)
  33.                                 End If
  34.  
  35.                                 'Define the SQL string, call the command executer, and paste the recordset into the data sheet...but leave connection open!!!
  36.                                 stSQL = "SELECT * From [" & strReference & "]"
  37.                                 SQL_ExtractData(ADOConnection, stSQL, rst)
  38.                                 wsData.Range(strGetExcelColumn & intRowDataTarget).CopyFromRecordset(rst)
  39.                                 stSQL = Nothing
  40.                                 ADOCommand = Nothing
  41.                                 rst.Close()
  42.  
  43.                                 intTranslationsRefRow = intTranslationsRefRow + 1
  44.                                 intColDataTarget = intColDataTarget + 1
  45.                                 strReference = wsTranslations.Range("A" & intTranslationsRefRow).Value
  46.                             Loop
  47.                             ADOConnection = Nothing
  48.                         Catch err As Exception
  49.                             'Routine to save error details to "Errors" tab in the sheet
  50.                             wsErrors.Range("A" & intErrRowIndex.ToString).Value = My.Computer.FileSystem.GetName(strBATFile).ToString
  51.                             wsErrors.Range("B" & intErrRowIndex.ToString).Value = IO.File.GetAttributes(strBATFile).ToString
  52.                             wsErrors.Range("C" & intErrRowIndex.ToString).Value = err.Message.ToString
  53.                             wsErrors.Range("D" & intErrRowIndex.ToString).Value = err.Data.ToString
  54.                             intBATFileErrorCount = intBATFileErrorCount + 1
  55.                             intRowDataTarget = intRowDataTarget - 1
  56.                             intBATFileCount = intBATFileCount - 1
  57.                             lblErrors.Text = "Number of Errors: " & intBATFileErrorCount
  58.                             intErrRowIndex = intErrRowIndex + 1
  59.                         End Try
  60.  
and the SQL_Extract Subroutine that is being called...
Expand|Select|Wrap|Line Numbers
  1.     Public Sub SQL_ExtractData(ByVal ADOConnection As ADODB.Connection, ByVal stSQL As String, ByRef rst As ADODB.Recordset)
  2.         Dim ADOCommand As New ADODB.Command
  3.         ADOCommand.CommandType = ADODB.CommandTypeEnum.adCmdText
  4.         ADOCommand.ActiveConnection = ADOConnection
  5.         ADOCommand.CommandText = stSQL
  6.         rst = ADOCommand.Execute()
  7.     End Sub
  8.  
Now I know that the connection to Excel (from VB.NET app) is fine because it's actually writing the exception error details into the sheet I reserved for errors. What's throwing me for a loop is why it cannot copy the record from the sheet on the network into that Excel file? Something to do with a missing/corrupt library on the users machine? Something to do with his new version of Excel? (Note: Other users use Excel 2010 with no issues)

Any help or insight would be appreciated as I am a "self-taught" programmer...even just discussing the issue might help me think about a solution even if you cannot offer one.

Thank you!!!

-Derek
Mar 9 '13 #1
0 2981

Sign in to post your reply or Sign up for a free account.

Similar topics

1
5866
by: Tim Hansen | last post by:
Greetings to all. I am having a problem running .asp pages for our new website. I beleive it to be an IIS problem, but all the troubleshooting has lead me nowhere. When I try to acces the...
1
4893
by: skilla | last post by:
Hi people, I've got WinXP Pro SP2 English on my laptop and since installing SP2 got the IISRESET "No such interface supported" error. The whole story: I was writing a fairly simple ASP app...
0
1493
by: Marc Gritter | last post by:
Hello there, I've got a really big problem with my Visual Studio 2003. When I try to debug I get the following message: Error while trying to run project: Unable to start debugging. No such...
2
2279
by: threeflush | last post by:
I have some code that checks to see if a document object exists in a sibling frame before continuing processing like: if (parent.frames.document){ .... } However, sometimes the frame I'm...
2
6790
by: John | last post by:
I have some code that changes a PDF file in another frame using: parent.frame.document.location.href = "PDF File" This code works fine the first time it is called. But if a PDF file is in that...
0
592
by: moitra | last post by:
We have a series of processes which have been running w/o problem for a year. Suddenly! we started getting this error which looks like stemming from DTC - "No such interface supported". The errors...
3
7832
by: Lekyan | last post by:
I have problem setting the password for an ADAM user using C#. I used the SetPassword code given in the Microsoft page, changed several parameters, but ran into an exception. I wonder if other...
4
2772
by: Smoothy1976 | last post by:
Weird problem that just started...I have no idea what has happened, but every project when I try to run(debug) I get a "Microsoft Development Environment" box, and it tells me "Error while trying...
2
17298
by: sgr | last post by:
Hello I'm making an application that uses an excel worksheet, My problem appears when I open the worksheet to see the data (then I close it and save the changes) and I try to insert a new row from...
1
5562
by: Jennifer | last post by:
I've been getting this error message recently with every project I try to run in the IDE: Error While trying to run project: unable to start debugging. No such interface supported. I've...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7357
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5598
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1522
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
402
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.