Why does VB.NET Jet 4.0 app crash if Office not installed?

喜欢而已 提交于 2019-12-24 08:24:57

问题


I'm working on a VB2008 project that references two Access databases using Provider=Microsoft.Jet.OLEDB.4.0;

It would seem if the user does not have MSOffice on their machine, the program crashes with a "XXX stopped working" on startup on Vista and Win7.

I thought that Windows had XP and above had Jet functionality built in? Does anyone know why this is happening? What are the correct project/publish/prerequisites required please?

TIA


回答1:


There is absolutely NO Jet support for x64 architectures. So the program will runtime error if you are running on an x64 proc and your application is compiling to AnyCPU.

Change the compile target of your application to x86 explicitly and your problems should go away...if I have correctly ID'ed the issue that is. If the failing machines are running x86 OSes then you'll have to look for another solution. But if the failing machines are running x64 OSes then I guarantee this is the problem.

Seth



来源:https://stackoverflow.com/questions/1142701/why-does-vb-net-jet-4-0-app-crash-if-office-not-installed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!