-1

The app connects to the Oracle DB directly, extracts data and makes it into an Excel file. The problem is it works only on the PC on with it was elaborated. Trying to use the project on other PCs throws errors of processor incompatibility, incorrect pathing to Oracle dll and what not.

Is there a way to make the app's connection to Oracle portable? To have all the necessary what nots in the project, without the need to configure it each time to every PC specifically?

If not, any other solutions?

Say: I could try making a web page on the server with the same functionality.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
leGato
  • 9
  • 3

1 Answers1

0

That is not so easy and straight forward.

Almost every driver/provider requires an Oracle client installation.

On Windows you have pre-installed the ODBC driver "Microsoft ODBC for Oracle", and the OLE-DB provider "Microsoft OLE DB Provider for Oracle", however these drivers are ancient and deprecated. They may not work in your environment.

The Oracle Data Provider for .NET, Managed Driver (ODP.NET Managed Driver) does not require any Oracle client installation, it would be portable. However this is .NET whereas Excel/VBA is COM

You would need to develop a .NET assembly and make it visible to COM, see Qualifying .NET Types for COM Interoperation, the magic attribute is ComVisible = true. Then you can call this .NET class in your VBA macro.

So, I would propose to deploy a proper "setup" program which covers all installation and configurations.

Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110
  • Thank you for you reply. ODP.NET Managed was the solution i tried using, considering [https://stackoverflow.com/a/34805999/21318607](this) answer of yours long ago. I'll stick to it and see if i'll manage. – leGato Mar 30 '23 at 08:22