Click here to Skip to main content
15,885,824 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to load the csv file in access database.
I am using
Microsoft.Office.Interop.Access.dll


Local it's working fine , once I deployed to server ,access database is not installed in server.

try to run the exe I got the below error.
trieving the COM class factory for component with CLSID {73A4C9C1-D68D-11D0-98BF-00A0C90DC8D9} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).


while I try to register it in server using regsvr32 I got the below error.

The module D:\folder\Microsoft.Office.Interop.Access.dll" was loaded but the entry point DLLRegisterServer was not found.

Make sure that "D:\folder\Microsoft.Office.Interop.Access.dll" is a valid DLL or OCX file and then try again.


What I have tried:

while I try to register it in server using regsvr32 I got the below error.

<pre>The module D:\folder\Microsoft.Office.Interop.Access.dll" was loaded but the entry point DLLRegisterServer was not found.

Make sure that "D:\folder\Microsoft.Office.Interop.Access.dll" is a valid DLL or OCX file and then try again.
Posted
Updated 16-Feb-18 10:58am

1 solution

The Interop .DLL is just a "go between" between your code and the Office suite. The COM object that needs to be registered are the Office components, not the Interop .DLL. It does not remove you from having Office as a prereq to using your app.

Having said that, you have a much bigger problem. You can NOT use Office Interop in an ASP.NET app. Office is not re-entrant tolerant and some Office functionality requires an interactive user logged into the console on the machine on which it's running. This means that it cannot support multiple requests at the same time, like from what a web application can generate, and web server don't normally have people logged into them, so any dialogs that Office puts up will never be responded to. They do NOT show up on the client systems, only the server console.

You will have to find another way to do what you want, like using OleDb to write to the Access database and you supply the code to parse the uploaded .CSV file.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900