Search code examples
databasevb.netvisual-studio-2008ms-accessoledb

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


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


Solution

  • 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