Why do I get "Dispatch : Error loading type library/DLL." when using MATLAB's ActiveX interface?
6 次查看(过去 30 天)
显示 更早的评论
Why do I get "Dispatch : Error loading type library/DLL." when using MATLAB's ActiveX interface?
hacc = actxserver('Access.Application')
hacc =
activex object: 1-by-1
hopen = invoke(hacc,'opencurrentdatabase',[pathname,filename])
hopen =
-1
set(hacc,'Visible','0')
ans =
activex object: 1-by-1
hWksp = get(hacc.DBEngine,'Workspaces')
The last line of code produces the following error:
??? Dispatch : Error loading type library/DLL.
Error in ==> P:\Program\matlab61\toolbox\matlab\winfun\@activex\private\actxcli.dll
Error in ==> P:\Program\matlab61\toolbox\matlab\winfun\@activex\get.m
On line 15 ==> varargout{1} = actxcli('get', varargin{1}.Handle,varargin{2:end});
Error in ==> P:\Program\matlab61\toolbox\matlab\winfun\@activex\subsref.m
On line 24 ==> B = get(A,S(idx).subs);
采纳的回答
MathWorks Support Team
2013-3-5
This error normally relates to improper installation of the type library of the product which you are using as the ActiveX server. This can usually be solved by reinstalling the application you are using as the server. If this does not help, if possible, please try to write a similar code in Visual Basic and see if that produces a similar error.
If the test in VB runs fine, please contact MathWorks Technical Support with the following information:
1) The output of executing the "ver" command at the MATLAB Command Window.
2) A small script file to reproduce the problem.
3) Information about the ActiveX object that you are using.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 ActiveX 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!