Skip to main content

Hello !

I'm using:

- Visual Cobol 2.2

- Visual Studio 2010

- 32 bits

- Oracle Client 11.2.0

The Cobol program is compiled ok.

On Project Properties, SQL, the preprocessor being used is OpenESQL and the directive SQL(DBMAN=ODBC) is set.

The driver Microsoft ODBC for Oracle is installed.

I added the connection Oracle Database (Oracle ODP.NET) and tested the connection. It's ok.

I can see the database, the tables, and access them.

But when I try to run the program I got a -19703 in this command:

EXEC SQL
            CONNECT :WS-USERNAME IDENTIFIED BY :WS-PASSWD
END-EXEC.

What am I doing wrong ?

Thanks in advance and sorry for any English mistakes.

Hello !

I'm using:

- Visual Cobol 2.2

- Visual Studio 2010

- 32 bits

- Oracle Client 11.2.0

The Cobol program is compiled ok.

On Project Properties, SQL, the preprocessor being used is OpenESQL and the directive SQL(DBMAN=ODBC) is set.

The driver Microsoft ODBC for Oracle is installed.

I added the connection Oracle Database (Oracle ODP.NET) and tested the connection. It's ok.

I can see the database, the tables, and access them.

But when I try to run the program I got a -19703 in this command:

EXEC SQL
            CONNECT :WS-USERNAME IDENTIFIED BY :WS-PASSWD
END-EXEC.

What am I doing wrong ?

Thanks in advance and sorry for any English mistakes.

You have some conflicting statements in your problem description.

The directives you are using are for connecting via ODBC in a native COBOL project which means that your connection needs to be created as a DSN using the ODBC Administration Tool. Look in Visual COBOL group-->Data Tools on the start menu.

You can use the Microsoft ODBC driver for Oracle but I would suggest that you use Oracles own ODBC driver instead.

The Oracle ODP.NET is a managed code ADO.NET Provider which can be used to connect a managed .NET program to your Oracle database.
These connections are created using the ADO.Connection Editor also available under the Visual COBOL group on the start menu under Data Tools.

In order to access ADO connections you need to compile with the DBMAN=ADO directive instead of ODBC.

When using DBMAN=ADO you must select either x86 or x64 as your target platform as anyCPU is not supported. You also have to ensure that the ADO Connection that you create is the correct bitism for the target cpu.

Please see the following videos that cover this area in more detail:

Using ODBC in Visual COBOL

Using ADO.NET in Visual COBOL

OpenESQL Database Connections


Hello !

I'm using:

- Visual Cobol 2.2

- Visual Studio 2010

- 32 bits

- Oracle Client 11.2.0

The Cobol program is compiled ok.

On Project Properties, SQL, the preprocessor being used is OpenESQL and the directive SQL(DBMAN=ODBC) is set.

The driver Microsoft ODBC for Oracle is installed.

I added the connection Oracle Database (Oracle ODP.NET) and tested the connection. It's ok.

I can see the database, the tables, and access them.

But when I try to run the program I got a -19703 in this command:

EXEC SQL
            CONNECT :WS-USERNAME IDENTIFIED BY :WS-PASSWD
END-EXEC.

What am I doing wrong ?

Thanks in advance and sorry for any English mistakes.

Thanks for tips and videos Chris !

Now everything is working fine !


Hello !

I'm using:

- Visual Cobol 2.2

- Visual Studio 2010

- 32 bits

- Oracle Client 11.2.0

The Cobol program is compiled ok.

On Project Properties, SQL, the preprocessor being used is OpenESQL and the directive SQL(DBMAN=ODBC) is set.

The driver Microsoft ODBC for Oracle is installed.

I added the connection Oracle Database (Oracle ODP.NET) and tested the connection. It's ok.

I can see the database, the tables, and access them.

But when I try to run the program I got a -19703 in this command:

EXEC SQL
            CONNECT :WS-USERNAME IDENTIFIED BY :WS-PASSWD
END-EXEC.

What am I doing wrong ?

Thanks in advance and sorry for any English mistakes.

Thanks for tips and videos Chris !

Now everything is working fine !


Hello !

I'm using:

- Visual Cobol 2.2

- Visual Studio 2010

- 32 bits

- Oracle Client 11.2.0

The Cobol program is compiled ok.

On Project Properties, SQL, the preprocessor being used is OpenESQL and the directive SQL(DBMAN=ODBC) is set.

The driver Microsoft ODBC for Oracle is installed.

I added the connection Oracle Database (Oracle ODP.NET) and tested the connection. It's ok.

I can see the database, the tables, and access them.

But when I try to run the program I got a -19703 in this command:

EXEC SQL
            CONNECT :WS-USERNAME IDENTIFIED BY :WS-PASSWD
END-EXEC.

What am I doing wrong ?

Thanks in advance and sorry for any English mistakes.

Thanks for tips and videos Chris !

Now everything is working fine !