Oracle Homes not returning any items

Oracle Homes not returning any items

Postby hpj » Thu 03 Nov 2011 23:38

Hello,

I just upgraded to version 6.50.237 of the dotConnect Oracle component and can no longer connect at all to any Oracle database.

Stepping through the code (I have the commercial version of Reflector so I can debug your binary library) I can see that the problem is that you are throwing away my Oracle Home because you are incorrectly determining that it is not the correct 32/64 bit mix.

I am running a 32 bit application on a 64 bit system and this check here fails in OracleConnectionHome.SingletonInstance (This is reflected code so your's probably looks slightly different):


Code: Select all
              bool? nullable = Utils.UnmanagedDllIs64Bit(strArray[i]);
              if (nullable.HasValue && ((IntPtr.Size == 4) ^ nullable.Value))
              {
                homes.a(new OracleHome("", "", strArray[i], ""));
                homes.a = homes.a((int) (homes.Count - 1));
                return (b = homes);
              }


In my case nullable is not set which means that the check always fails and a valid Oracle home is thrown away. If I just remove this check everything works fine after that.

Even weirder is that if I step into the UnmanagedDllIs64Bit call it looks like it returns false (Which what I would expect), however when the value ends up in the call above it is null.

Is there any way I can stop this new check or any other way I can work around it.
hpj
 
Posts: 2
Joined: Tue 09 May 2006 05:34

Postby Shalex » Mon 07 Nov 2011 08:12

Could you please debug the GetDllMachineType method (within UnmanagedDllIs64Bit()) and tell us if there is any exception? If yes, where is it exactly? Specify its full text.
Shalex
Devart Team
 
Posts: 7780
Joined: Thu 14 Aug 2008 12:44

Postby rpaul » Mon 07 Nov 2011 15:37

Hi,

We are having similar problems with 6.50.237. I believe the issue is you are passing only the path folder to the UnmanagedDllIs64Bit and not appending the oci.dll.

Code: Select all
            if (File.Exists(Path.Combine(array[k], "Oci.dll")))
            {
               for (int l = 0; l < oracleHomeCollection.Count; l++)
               {
                  if (array[k] != null && !(array[k] == ""))
                  {
                     string text4 = array[k];
                     if (text4[text4.Length - 1] == '\)
                     {
                        text4 = text4.Substring(0, text4.Length - 1);
                     }
                     if (string.Compare(text4, Path.Combine(oracleHomeCollection[l].Path, "bin"), true, CultureInfo.InvariantCulture) == 0)
                     {
                        oracleHomeCollection.a = oracleHomeCollection[l];
                        OracleHomeCollection result = OracleHomeCollection.b = oracleHomeCollection;
                        return result;
                     }
                     if (string.Compare(text4, oracleHomeCollection[l].Path, true, CultureInfo.InvariantCulture) == 0)
                     {
                        oracleHomeCollection.a = oracleHomeCollection[l];
                        OracleHomeCollection result = OracleHomeCollection.b = oracleHomeCollection;
                        return result;
                     }
                  }
               }
               bool? flag = Utils.UnmanagedDllIs64Bit(array[k]);
               if (flag.HasValue && (IntPtr.Size == 4 ^ flag.Value))
               {
                  oracleHomeCollection.a(new OracleHome("", "", array[k], ""));
                  oracleHomeCollection.a = oracleHomeCollection[oracleHomeCollection.Count - 1];
                  OracleHomeCollection result = OracleHomeCollection.b = oracleHomeCollection;
                  return result;
               }
            }



You check File.Exists(Path.Combine(array[k], "Oci.dll")))
But then call bool? flag = Utils.UnmanagedDllIs64Bit(array[k]); without the Oci.dll added.
rpaul
 
Posts: 3
Joined: Fri 04 Nov 2011 21:50

Postby Shalex » Mon 07 Nov 2011 17:24

Thank you for your assistance. The bug is fixed. We will post here when the corresponding build of dotConnect for Oracle is available for download.
Shalex
Devart Team
 
Posts: 7780
Joined: Thu 14 Aug 2008 12:44

Any ETA on that?

Postby hpj » Mon 07 Nov 2011 20:14

Shalex wrote:Thank you for your assistance. The bug is fixed. We will post here when the corresponding build of dotConnect for Oracle is available for download.


Just curious of how long that might be? If it is one month we could probably live with it if it is much more that we might need to look at some other solution to this problem because right now our product can't be used with an instant client.
hpj
 
Posts: 2
Joined: Tue 09 May 2006 05:34

Postby Shalex » Fri 11 Nov 2011 15:18

New build of dotConnect for Oracle 6.50.244 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=22547 .

This build includes the fix for the bug with using Oracle Instant client.
Shalex
Devart Team
 
Posts: 7780
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle