My machine for various reasons has multiple Oracle Clients...SQL*NET for connecting to Oracle 8.17 , NET8 for connecting to a 10g instance . I cannot change this as this is the setup by various vendors. I installed the Oracle 10g Express Edition on the same machine as a testbed fro development, when I did, i could no longer use applications such as ODBC and OLEDB adapter for Visual Studio to connect to instances defined in the TNSNAMES.ORA in the SQL*NET and NET8 clients, so i copied the definitions into the XE's TNSNAMES.ORA, but it did not work. After removing 10gXE and associated registry keys, everything works fine. What am I missing here ? How does windows decide which ORACLE_HOME to use ?