Commodore
Commodore
280 views

Working with SQL Database in Managed COBOL

Jump to solution

I would like to learn how to connect, read and modify an SQL database in Managed COBOL. I have created a simple sql database in Microsoft SQL Server Management Studio v 18.7.1. Is there documentation and/or a sample program available for beginners?

0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

If you are referring to using embedded SQL statements within your programs using OpenESQL then working with SQL in managed COBOL is done the same way as it is in native COBOL. Instead of using ODBC DSNs for your connections you instead use ADO.NET DSNs for .NET and JDBC DSNs for JVM COBOL. For .NET there are also some extended statements that use EXEC ADO instead of EXEC SQL.

There are some examples available in the Samples browser, click Show .NET COBOL only (or JVM COBOL) from the drop down and then select SQL as the topic in the left hand pane and then you will be presented with a list. Any that begin with OESQL apply.

There are also some videos in the Visual COBOL in a Nutshell series that go over individual topics in greater detail. The Playlist can be found here.

View solution in original post

0 Likes
3 Replies
Micro Focus Expert
Micro Focus Expert

If you are referring to using embedded SQL statements within your programs using OpenESQL then working with SQL in managed COBOL is done the same way as it is in native COBOL. Instead of using ODBC DSNs for your connections you instead use ADO.NET DSNs for .NET and JDBC DSNs for JVM COBOL. For .NET there are also some extended statements that use EXEC ADO instead of EXEC SQL.

There are some examples available in the Samples browser, click Show .NET COBOL only (or JVM COBOL) from the drop down and then select SQL as the topic in the left hand pane and then you will be presented with a list. Any that begin with OESQL apply.

There are also some videos in the Visual COBOL in a Nutshell series that go over individual topics in greater detail. The Playlist can be found here.

View solution in original post

0 Likes
Commodore
Commodore
Chris, thank you for that information!
0 Likes
Admiral
Admiral
many examples are in "Visual Cobol Forum", also in "Netexpress Forum", also by microfocus examples!
Easy to use, great working, what is your intution?
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.