473,657 Members | 2,282 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 CopyFromRecords et 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...ev en 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 2994

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

Similar topics

1
5873
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 pages via http://ip/admin/index.asp (ip is the "home directory") i get: Server Application Error The server has encountered an error while loading an application during the processing of your request. Please refer to the event log
1
4899
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 with in-memory recordsets, and while testing I issued an iisreset to get 'clean test results', but I got the "No such interface supported".
0
1510
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 interface supported This happened at once, I've nothing serious changed in the program code, just tried to debug again and got the message. I've been searching on the
2
2298
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 checking has an Adobe Reader 7.0 pdf file in it. If it does, and when it hits the above line of code, the error message:
2
6803
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 frame and the code is called again IE gives me an error: "no such interface supported" I have used this code for the past 5 years and it has worked fine with
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 are erractic, not process specific. The same process which had failed could be run without problem 10 mins later. The process code is in VB.net and backend database is sql 2000. The server OS is Windows 2000 Advanced server Service Pack 4 ...
3
7847
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 people have solved this problem. But I have searched Google groups for a couple days but still couldn't get a solution. I copied the code from: ...
4
2782
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 to run project: Unable to start debugging" and on the next line "No such interface supported". I have no idea what has happened, and its for every project. I have tried reinstalling vb.net and the 1.1 componenets, nothing, I tried to register...
2
17349
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 my application appears the error: System.Runtime.InteropServices.COMException(0x800401A8): Exception HRESULT: 0x800401A8 Thanks for all
1
5566
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 tried reinstalling and it doesn't help. Please, what can I do to fix this? I've had to make a change to an app and now I can't debug it and it's driving me nuts!
0
8319
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8837
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8612
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6175
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5638
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4171
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2739
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 we have to send another system
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.