'Error while trying to retrieve text for error ORA-01019 in VB6

I'm getting this error on vb6 when trying to connect to an oracle database, debugging puts me in this line, oracon.Open, here's my connection string.

Provider=MSDAORA.1;User ID=user;Password=pwd;Data Source=orcl;Persist Security Info=False

I started getting this error when I installed Oracle DataAccess for .NET since System.Data.OracleClient was no longer supported for .NET Framework 4 and up.

My programs developed in .NET still works fine, even old ones developed in Visual Studio 2008/.NET Framework 3.5 using System.Data.OracleClient. But when I opened some legacy systems developed in vb6 I get that error.

Edit: The oracle server is 11gr2, my first client install on the pc is 11gr1. The Oracle DataAccess version I installed is the latest which was around 12... forgot the exact version



Solution 1:[1]

This comes from installing 64 bit Client after 32 bit Oracle Client

When you installed Oracle DataAccess for .NET, it changed the PATH environment variable, putting the new 64 bit oracle client before your old 32 bit oracle client.

  1. In the start bar, search for "Env"
  2. Open "Edit the system environment variables"
  3. Click the "Environment Variables" button.
  4. From the "System variables" list choose "PATH" and press Edit
  5. Re-Arrange Path variable so the original path to 32 bit oracle comes before the path to the new 64 bit oracle.
  6. Make sure your tnsnames.ora and sqlnet.ora are in both locations.

This should make both 32bit and 64 bit applications work together.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mike