Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003

    Thumbs up Unanswered: MySQL Connection to COBOL

    Hi MySQLians,

    For the last 2 months I have tried to establish connection between COBOL and MySQL. Hope I have succeeded a stage in this regard.

    I have used

    Remote server: MySQL Server 4.0.17-max in Suse Linux

    Client : Windows 2000
    Microsoft VC++ 6.0
    CA-Realia COBOL Compiler Version 6.0.45
    Microsoft (R) Incremental Linker Version 6.00.8168
    MySQL 4.0.17.max-debug for Windows

    In COBOL I can call C functions as external subroutines. I have called the MySQL C API functions from COBOL and try to invoke the connection to MySQL. To do this currently I am in need to call mysql_init, mysql_real_connect, mysql_error and mysql_close functions. I have coded in COBOL and executed, each time when I struck up with error I have mailed to this list, but I could not find any favorable response.

    Finally now, I have reached the status of connection establishment between COBOL and MySQL with the error message;

    "Can't connect to MySQL server on 'neptune' (10049)"

    according to the manual from the MySQL site, this error happened due to improper Port No or Socket information. But, I have passed the default Port No.3306 and NULL for the socket as parameter to the function mysql_real_connect.

    Can any one suggest me what else creating this error?

    I think to establish connection in this way it does not require ODBC settings and DNS in the client machine. It just established the connection via *wsock32* library of the C (here it is VC++).

    I have further doubts, Is there a need of any SSH in client side? I don’t have clear idea about this…

    I hope if I succeed it will be a success to MySQL team too…

    Expecting valuable suggestions…

    Thanks in advance…

    Sincerely yours,

  2. #2
    Join Date
    Nov 2003

    MySQL Connection to COBOL - SUCCESS....

    Hi all!,

    yes, I have made the proper connection from COBOL to MySQL...

    My COBOL application can able to communicate with MySQL Database. I can able to sent and receive Queries to MySQL and get back result set to COBOL....

    It's all happened by using MySQL C APIs.... COBOL external subroutine CALL methodology....

    Right now we can add COBOL to the list of fronend support for MySQL.....

    Thanks for all supports from this forum...


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts