Interop Silverlight 4 and MS Access 2010 Interaction Issues

I am trying to run an existing MS Access database (Access 2010) from Silverlight 4 OOB with elevated privileges. I keep getting the error. I can create a new Access application using the CreateObject keyword, but when I try to start an existing one, I get an error: "The object was not found registered for the specified ProgID."

Any help is appreciated. Here is the code I'm using:

string sMSAccess = "C:\\Users\\storltx\\Documents\\SL4Demo.accdb";
dynamic MSAccess = ComAutomationFactory.GetObject(sMSAccess);
MSAccess.Visible = true;
+3
source share
2 answers

Try using your code: -

string sMSAccess = "C:\\Users\\storltx\\Documents\\SL4Demo.accdb";
dynamic app = ComAutomationFactory.CreateObject("Access.Application");
app .Visible = true;
app.OpenCurrentDatabase(sMSAccess);
0
source

, Access.Application GetObject. :

dynamic MSAccess = ComAutomationFactory.GetObject("Access.Application"); 
+2

Source: https://habr.com/ru/post/1734674/


All Articles