4
Answers

Windows Applications Compatibility with different operating systems

Ali  Alfaraj

Ali Alfaraj

13y
1.6k
1
Good day dear members,

I have a good question:

How can I make sure that the window application that I developed in visual studio will be functioning well in different operating systems (i.e. windows 7, vista and XP).

Just a day ago, I developed a program in vista (32 bit operating system), and when I install it in windows 7 (64 bit operating system) and run it, I got the following error:
microsoft.ace.oledb.12.0 provider is not registered

How to avoid such issues in the future?? Is it possible for a window application developed in specific operating system to be usable in all other window operating systems?

Thanks in advance,
Ali
Answers (4)
0
Zoran Horvat

Zoran Horvat

NA 5.7k 516.2k 13y
This error indicates that OLEDB provider for Access is not installed on the target machine. You cannot guaratee availability of OLEDB providers from code, but rather from installation package.

To do that, you can search for Access-related keys in the Registry from your application's setup. If appropriate version is missing, then your setup should start its installation before procedding, and test the exit code of the Access setup process.

Zoran
Accepted
1
Zoran Horvat

Zoran Horvat

NA 5.7k 516.2k 13y
It has nothing to do with the problem unless particular piece of software has compatibility issues. For example, it happened that different Oracle releases had issues with 64-bit Windows so applications had to be modified to support Oracle 11 at the moment. That is practical case which must be taken into account when writing applications.

Otherwise, application setup must always check whether all required libraries are in place. Some libraries are part of the setup, some are installed by other applications, like MS Office. Setup must either contain installation packages for required components or fail and point the user to the place from which he can install required component manually.

Typical situation is to test whether .NET Framework is present. You do that by coding so-called bootstrap setup in C++, so that it doesn't require .NET Framework. Then you test the Registry to see what versions of .NET Framework are available. If the one is missing, bootstrap setup can start its setup and test the return code. When child setup process exists with exit code indicating success, your setup continues and installs the application.

Zoran
0
Sam Hobbs

Sam Hobbs

NA 28.7k 1.3m 13y
First note that years ago, Microsoft stated an intent to discontinue support of some database technology, which included OLEDB for Access databases. I forget the details but I am sure that is why you are getting the error for 64-bit Windows. There was so much protest from customers that Microsoft has provided a 64-bit version but it must be installed separately. An alternative is to change your application so it always uses 32-bit (x86).

To dertermine availability of software, I suggest using documented solutions. I assume that Microsoft has documented a way to determine if OLEDB for Access is available, but since the problem is so well known it seems it is not as important as you thought. More specifically, don't access the registry directly when there is a documented solution.
0
Ali  Alfaraj

Ali Alfaraj

NA 66 80.9k 13y
Thanks for the answer Zoran,

So the fact that the two operating systems are different in term that one is 32 bit and the other is 64 bit. has nothing to do with this prolbem??

Also, I beleive the OLEDB provider for access is installed on the target machine.