Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle & VB

Re: Oracle & VB

From: Al Reid <areidjr_at_reidDASHhome.com>
Date: Thu, 2 Mar 2006 07:27:56 -0500
Message-ID: <Ock2UTfPGHA.3888@TK2MSFTNGP12.phx.gbl>


News wrote:
> Al Reid a écrit :
>
>> I hope this is what you are after. If not, can you be more specific
>> as to what you are trying to accomplish?
>
> Yes thanks ! this is what I have been looking for.
> Since I don't know which cRegistry class you use I have adapted it to
> the one developed by Steve McMahon from:
>
> http://www.vbaccelerator.com/home/VB/Code/Libraries/Registry_and_Ini_Files/Complete_Registry_Control/cRegistry_Class.asp
>
> this way:
>
> oReg.ClassKey = HKEY_LOCAL_MACHINE
> oReg.SectionKey = "Software\Oracle\KEY_OraDb10g_home1"
> oReg.ValueKey = "ORACLE_HOME"
>
> strTNSNamesPath = oReg.Value & "\network\ADMIN\tnsnames.ora"
>
> IsCharAlpha is not VB function. I think it's c/c++. It's defined in
> the
> user32.dll. To use it one must declare:
>
> Private Declare Function IsCharAlpha Lib "user32" _
> Alias "IsCharAlphaA" (ByVal ch As Byte) As Long
>
> Now the problem is with many local oracle homes. In my case I have 10g
> and 9.2 clients. Some users have 8 and others 7.x. In my case the
> section key of 10g is "Software\Oracle\KEY_OraDb10g_home1". How to
> know the key of the last client installed ?

I realized that there were a few classes and functions that I failed to include, but I was sure you would get the point. I have not yet worked with 10g, although, I am going to install the 10g client on my machine today.

Up thru 9i, the registry key HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ORACLE_HOME pointed to the active client. There are also sections/keys for each client installed (HOME0, HOME1, etc.) The key 'HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ALL_HOMES\LAST_HOME' holds the number of the last home. By precixing with 'HOME' you have the name of the key that holds info on the last client installed. Again, this held true thru 9i.

I hope this helps.

-- 
Al Reid
Received on Thu Mar 02 2006 - 06:27:56 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US