Connection Name Not Found - 19702

Hi,

I am migrating from Server Express 5.1 to Visual Cobol 2.3. I am getting error as connection name not found.

I am using ESQL and Sub Program is calling Main Program. Connection is getting established in Sub Program but in Main Program its getting lost.

Any Ideas?

Thank You

  • What does your CONNECT statement look like and what database are you connection to?

    Are you stating that you connect successfully in a called subprogram and you can access the database fine but then when you do an exit program to return to the main program you get a -19702 error on another sql statement?

    Do you cancel the subprogram after returning?

  • Hi Chris,

    Sorry, I was on vacation and couldn't respond. I checked my programs again, Sub Program, CONNECTDB and Main Program. Sub Program will connect to CONNECTDB (which has DB details). CONNECTDB is giving me error as 19703. Below is the statement where its throwing error. It connect's to Oracle database.

              EXEC SQL

               CONNECT :WS-ORA-UIP-V USING :WS-ORA-SID-V

              END-EXEC.

    WS-ORA-UIP-V = UID\PWD and WS-ORA-SID-V=DBNAME

    My directives are set to        $set sql(dbman=odbc targetdb=ORACLE)

    Thank You,

    Ramesh

  • Hi Ramesh,

    Your slash separating the UID and PWD is going in the wrong direction.

    It should be UID/PWD.

    Also, what is DBNAME referring to? This should be the actual name of the DSN that you created using the ODBC Administration Tool.