Gen EDGE

 View Only
  • 1.  How to select another database when using iefgdic.ini

    Posted Jun 19, 2019 08:15 AM
    Hi,

    I am trying to connect to different databases (but only one at the same time..) when I run tests from a CA Gen GUI application.
    But after I have select and connect to a server and database initially, I am not provided with the opportunity to change the server or source.

    The only thing that may help, is to delete the file iefgdic.ini and start an application - then I am (almost always...) provided the opportunity to
    select a new ODBC-source . Sometimes a new iefgdic.ini file is created, and sometimes the connection to the correct database is established.

    Sometimes when I start an application and there is none existing iefgdic.ini, an incomplete dito is left...
    Only containg the following rows:

    [MaxDatabases]
    Max=100

    If that happens, I have to handcraft the iefgdic.ini and restart the application. Sometimes it works.

    [MaxDatabases]
    Max=100
    [ODBC]
    DatabaseCount=1
    Database1=GENDB
    Trancode1=
    LoadModule1=
    Server1=GENDB
    SQLid1=ABC
    SQLPassword1=ABC

    I also have some problem yo connect to the database if I don't point it out as the default database when I configure the ODBC-source.
    That is possible to solve by defining one ODBC-source for each database, but local admin permission is required for that operation.

    So any one that knows how to use one ODBC-source from which one could connect to different databases without edit iefgdic.ini each time ?

    Or is there any other solutiuons ?

    /Tomas Norström


  • 2.  RE: How to select another database when using iefgdic.ini

    Posted Jun 19, 2019 08:59 AM
    Hi Tomas,

    I think the iefgdic.ini file can contain multiple entries and you can then select which one you want with the /db= parameter on the command line that starts the GUI. The value after /db= is the database name specified.

    Regards,

    Darius

    ------------------------------
    Information Engineering Technology Ltd
    ------------------------------



  • 3.  RE: How to select another database when using iefgdic.ini

    Posted Jun 20, 2019 02:15 AM
    Thanks Darius,

    It is a bit confusing, it is not the name of the database that should be entred - it is the name of the ODBC-source.

    However, it works. Thanks.

    /Tomas


  • 4.  RE: How to select another database when using iefgdic.ini

    Posted Jun 20, 2019 04:09 AM
    Tomas,

    Regarding your post below about the local admin issue, you can specify the location of the iefgdic file with the IEFGDIC environment variable, so you can use a file in a folder which you have permission to edit.

    There is a more complete description of how this works in the CA documentation:

    https://docops.ca.com/ca-gen/8-6/en/implementation-toolset/windows-implementation-toolset/testing-and-running-applications-for-windows-it

    Darius

    ------------------------------
    Information Engineering Technology Ltd
    ------------------------------



  • 5.  RE: How to select another database when using iefgdic.ini

    Posted Jun 20, 2019 06:37 AM
    Hi Darius,

    The inconvinience with the local admin permission is related to the ODBC-source.  If I define unique ODBC-sources for each database
    (during the configuration change the default database to my database),  then I need to be local admin if I would like to add a new database
    or change the default to my "new database".

    /Tomas


  • 6.  RE: How to select another database when using iefgdic.ini

    Posted Jun 20, 2019 06:39 AM
    Hi Darius,

    We already have the iefgdic.ini file in a folder we are allowed to edit the content in.

    The inconvenience I was refering to is the fact that I am not allowed to to create (or change the konfiguration for) a ODBC-source if I don't have local admin permissions.

    If I do as Andy tell me to do and create unique ODBC-sources for every database and in the configuration Point out "my database" as default, I need
    to apply for local admin permissions and get it approved before I can connect to my new database.

    /Tomas


  • 7.  RE: How to select another database when using iefgdic.ini

    Posted Jun 20, 2019 08:29 AM
    You would only need to do this once per datasource though. For example, if you want to be able to connect to DSN1 and DSN2, then setup a datasource for each one and have an entry for each one in your iefgdic. Then when you run the application, use /db=DSN1 or /db=DSN2 on the command line to select which datasource you want to connect to.

    ------------------------------
    Information Engineering Technology Ltd
    ------------------------------



  • 8.  RE: How to select another database when using iefgdic.ini
    Best Answer

    Broadcom Employee
    Posted Jun 19, 2019 09:08 AM
    Tomas,

      I read your description and believe you have a Fat Client, a client that contains SQL.

      Every time a successful connection is made to the database, the iefgdic.ini will be updated.

      First, you will need a ODBC datasource for each database, each with a different name.

      Second, when you launch the application, you will need to use the /db=<database> option.  If you are running the client executable from a DOS prompt or Icon, put a /db=<database> on the command line.  Using your iefdgic.ini, the command would look like "FatClient.exe /db=GENDB".  If you are launching the Fat Client from the Build Tool, put the /db=GENDB in the "Clear Screen Inputs".

      Simply change the /db=<database> to any other ODBC datasource name you have created to connect to other databases.

    Cheers,
    Andy Hebert
    Broadcom

    ------------------------------
    Principal Support Engineer
    Broadcom
    ------------------------------



  • 9.  RE: How to select another database when using iefgdic.ini

    Posted Jun 20, 2019 02:15 AM
    Hi Andy,

    Thanks for Your answer.

    I really don't understand how the iefgdic.ini file works, but by pointing out a ODBC-datasource (DB=)  having the actual database GENDB defines as Default

    it works fine.

    Unfortunately there is a bit unconvinient if a new database should be used and You don't have local admin permission on your workstation.


    /Tomas