winforms4gl

How to connect to an Informix database on a server from Genero Studio?


We want to migrate written 4gl programs (with their .per, form files) to Genero Studio so it can be with Windows Forms. How could we create a connection so the .4gl files can retrieve the needed databases? I just want to connect to it, I don't want to copy paste the whole database to my PC. Is there any tutorial step by step? The Genero Documentation is giant and not very clear. Maybe it is if your starting from nothing, but we already have written programs that we just want to make more visual with Windows Forms.


Solution

  • In your Genero Studio configuration, there should be a list of environment sets listed. One of them should be for your backend. Make sure it is configured properly. Then make sure it is checked for your preferred configuration.

    There are different ways to connect to a DB, make sure you review the following doc:

    http://www.4js.com/online_documentation/fjs-fgl-manual-html/User/Connections.html

    From there, I would write a simple BDL program to test:

    main

    define mystatus smallint

    database mydb # this is where you can adapt based on your preferred connection method

    end main

    Make sure that in your environment set, Debug is check since this will provide SQL driver debug info (FGLSQLDEBUG=9)

    From there, check your output panel and see what needs to be configured

    When the connection is working, you can extract a schema (needed at compile time) or maybe you already have a schema (.sch file) already created that you simply want to import