8 Replies Latest reply on Jun 10, 2008 6:02 PM by 379176

    Supporting Multiple OO4O Versions

    431514
      Is it possible for an application to support two different versions of the OO4O C++ Class Library without having to compile two different versions of said application? We'd like our application to be able to support an 8i AND a 9i version of OO4O. Based on research thus far, this doesn't sound like a viable option, but I'd like another developer to confirm this. Thanks.
        • 1. Re: Supporting Multiple OO4O Versions
          3542
          No.

          This issue was the main reason we moved away from using oo4o.

          We could not always control which version of oo4o was installed on our users computers and therefore (as you did) had to build a version of our apps against each known version of the oo4o libraries.

          We have since moved over to using OCI as it offers backwards compatibility.

          Adrian
          • 2. Re: Supporting Multiple OO4O Versions
            136148
            Hi Adrian,

            Adrian : "...and therefore (as you did) had to build a version of our apps against each known version of the oo4o libraries."

            If I have only one development machine having oracle 9.2. Can I achieve what you have said in the above statement? If yes which all files of OO4O libraries should I copy on to my development machine for building my EXE?

            How many versions of OO4O are out there for you guys were building verrsions of your apps.

            If I have oracle 9.2 client, will this work on any en user m/c with 9.x client? or it works on 9.2 client only?

            My application is VB6 based, can I use OCI libraries? or it can be used only from VC++?

            Thanks.
            • 3. Re: Supporting Multiple OO4O Versions
              3542
              Hi

              It depends wether or not you can guarantee that all users that use the software will have the Oracle 9.2 client installed which uses oo4o version 4.4.0.0.

              Rather that copy the oo4o files over, the best method is to use the Oracle Universal Installer and install the oo4o component. You will find it under "Windows Interfaces".

              There are lots of different version of oo4o, we used to have to support 18+ versions. Each one needed a specific application. It was a nightmare!

              In my experience, each release of the Oracle Client ships with a different version of oo4o. Even minor releases seem to get a new version of oo4o.

              OCI is "C" based so it is a lot more straight forward to use from C++. However, you could use OCI from VB if you:-

              1) Buy in third-party components
              2) Develop your own wrapper (COM would probably be the way to go) around the OCI that could be used by your apps. Alternatively, expose the functionality you need using a standard WIN32 DLL with exported APIs. Either method would require c++ development.

              Hope this helps.

              Adrian

              • 4. Re: Supporting Multiple OO4O Versions
                136148
                Thanks Adrian,

                Your mail was very helpful. So if I need to support user-defined datatypes on oracle from VB6, the best is 3rd party components. If you are aware please let me know some of the 3rd party products that are available for VB6?

                regards,
                Avins.
                • 5. Re: Supporting Multiple OO4O Versions
                  512382
                  Hi Adrian,

                  I am facing a problem, and after reading your comment about multiple versions of OO4O, I thought, I could get some suggestion from you on the issue

                  I am working on a project which is a large application in VB 6 & Oracle 8i. Application is using Oracle object library (8.0.5 OO4O). Customer wants to change the oracle client & OO4O from 8.0.5 to 9i or 10g. On doing the application performance drops to about 1/5 of original.

                  I want to know why the application is behaving this way and what kind of changes are required to be done to application code to regain the original performance.

                  Thanks & regards
                  Pradeep
                  • 6. Re: Supporting Multiple OO4O Versions
                    441662
                    I have run into a problem with using a Visual Basic 6 application written for Oracle 8i (8.1.7) client and OO4O. It was built and runs on Windows 2000 and XP Pro.

                    The application does not work with the Oracle 9i Release 2 client running on Windows XP Pro. Even though we do have MDAC 2.8 and the VB6 runtime installed. Not sure if it had service packs for VB6 or not.

                    As a matter of fact, the Oracle 9i client install does not even install OO4O. We had to download and install ODAC for 9i.

                    The strange thing is we do not get an error on the 9i client even though the password does not get changed.

                    Anybody have any updates on OO4O having upwards and backwards compatibility? Are there certain service packs or hot fixes that need to be installed? Is there some conflict happening?

                    Or could I use the typelib from 8i OO4O (oip8.tlb) in the 9i client for it to work?Maybe late binding should have been used instead of early binding?

                    Would like to upgrade the 8i servers and clients to 9iR2, but this problem is preventing that form happening. Had to uninstalll the 9i client and then install the 8i client for the application to work.
                    • 7. Re: Supporting Multiple OO4O Versions
                      441662
                      I resolved it. Here is what I discovered.

                      In Visual Basic 6, I was using early binding. The solution is to use late binding.

                      Early Binding:
                      -------------------

                      ' This only worked for me running on the 8i client if I built it using the 8i client.
                      ' you have a Project - Reference for
                      ' Oracle InProc Server Type Library - oip8.dll or whatever version you are using
                      Dim mOraSession As OraSession
                      Set mOraSession = New OracleInProcServer.OraSessionClass
                      On Error GoTo HandleError:
                      Set mOraDatabase = mOraSession.OpenDatabase( _
                      txtDatabase.Text, _
                      txtUserId.Text & "/" & txtOldPassword.Text, 0&)

                      Late Binding:
                      ------------------

                      ' This runs on both 8i and 9i clients.

                      ' Do NOT have a Project - Reference to
                      ' Oracle InProc Server Type Library - oip8.dll or whatever version you are using
                      Dim mOraSession
                      Set mOraSession = CreateObject("OracleInProcServer.XOraSession")
                      On Error GoTo HandleError:
                      Set mOraDatabase = mOraSession.OpenDatabase( _
                      txtDatabase.Text, _
                      txtUserId.Text & "/" & txtOldPassword.Text, 0&)
                      • 8. Re: Supporting Multiple OO4O Versions
                        379176
                        How to I change the default ORACLE_HOME for an application that was written for 8i. We are testing an application upgrade - and I've deployed 10g client; but each time we lauch the application, it's looking for Oracle 8i *.dlls.

                        Thanks