This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MF COBOL and ODBC . Do I need to connect in CALL-Module again to the database?

I use ESQL with ODBC.

In the main-application I have a connect to a database. Works.

When calling a sub-cobol-application, do I have to connect again?
And do I have to close the connection in the sub?

If not open again, how can I find out if there is a connection, because not all main-applications are using a database.

  • you need to connect only one time and disconnect also.

    i connect in my starting program to the database, works with this all tables from this db in all programs and subprograms called from the start application.

    I you are interessed, i can send you demo sql programs how to do this! (please email or pm)

  • First, simple answers to your questions:
    1 -> no
    2 -> no
    3 -> I cannot see any use for this.

    Have a look at your Net Express documentation (Help), chapter "Database Access Guide":
    -> Part 1 Database Access Facilities -> Multiple Program Modules
    -> Part 2 OpenESQL -> Database Connections

  • The problem is that the database connect time is very small. So if I connect at the first pllication and the user is in longer, the connection will be drop from MYSQL-Server and I can not find out if this happens. Therefore.

    The MYSQL-Timeout is on 15 minutes. So. If the user is doing nothing in between 15 minutes: ByeBye Connection.

    I ask the DB-Admin to make this time longer, but they will not do because of security-level.

    And now?