How to know the DBMS currently used

Author: ncolmart@medinfo.fr (ncolmart)

Hi

In order to speed up database retrieve, I need to put in place 'where' clause in some cases.
But I've got some problem for a where clause including dates because the format of the clause is DBMS specific.

Is there a way to know to which type of DBMS an entity is currently connected ?
(Currently with Uniface 8.2.03 and soon with Uniface 9.4)

Thanks

Nicolas

5 Comments

  1. Hi Nicolas,

    AFAIK, there is no direct functionality to retrieve the actual DBMS driver which is associated with an entity.

    You can retrieve the MODELED database using $entinfo("myentity",DBMSPATH).

    But the uniface ASN allows all kinds of redirections,
    for complete DBMSPATHs ($ORA = $SOL) as well as for single entiries.

    Most used workaround: provide logicals in the ASN if redirections take place.


    Take care that there infos always in sync.

    So you start getting the modeled database with some code like:

    variables
       string v_dbmspath
    endvariables
    v_dbmspath = $entinfo($entname,"DBMSPATH")
    if ($logical("dbms_%%v_dbmspath%%%") != "")
       v_dbmspath = $logical("dbms_%%v_dbmspath%%%")
    endif
    if ($logical("dbms_%%$entname%%%") != "")
       v_dbmspath = $logical("dbms_%%$entname%%%")
    endif

    SUccess, Uli


    Author: ulrich-merkel (ulrichmerkel@web.de)
  2. Hi Uli

    Thanks for your time and for your answer.

    This is the way I'll solve this problem.
    I'll add some new logicals in the asn file or some new parameters in my application.

    Thanks
    Nicolas


    Author: ncolmart (ncolmart@medinfo.fr)
  3. Hi Nicolas

    Every DBMS has its unique system tables. Just check (for the DBMS in question) which system tables are there on the database.

    As we do (did) have four different databases, we have sometime -like you- to distinguish between them :-)

    Ingo

     

     


    Author: istiller (i2stiller@gmx.de)
  4. There are some possibilities to get the database behind a $path,
    but if single entities are reassigned, they will not help.

    Success, Uli

    It is a very old problem, more detailed info from the uniface listserver:

    http://groups.google.com/group/comp.soft-sys.app-builder.uniface/browse_thread/thread/738b708380466e22/09269b0f21e60a95

    http://groups.google.com/group/comp.soft-sys.app-builder.uniface/browse_thread/thread/355cda1b7025c798/1a038116b4af0596


    Author: ulrich-merkel (ulrichmerkel@web.de)
  5. Thanks Uli and Ingo.
    All our customers have deployed on a single type of DBMS.

    So, I'm not yet sure which solution I'll chose but thanks to your help I now have many possibilities

    Nicolas


    Author: ncolmart (ncolmart@medinfo.fr)