Using DYNAMIC.CBL from \\NETEXPRESS\\Examples\\Net Express IDE\\ODBCESQL as an example, I have written a program to test dynamic SQL against a SQL Server Database. I was wondering if there is a way to declare more than 1 DYNAMIC_SQL cursor?
I first coded and tested retrieving data from 1 table using the following cursor:
EXEC SQL
DECLARE VCURS CURSOR FOR DYNAMIC_SQL
END-EXEC
Then, I added a second cursor to retrieve data from another table in the same database:
EXEC SQL
DECLARE VCURS CURSOR FOR DYNAMIC_SQL
END-EXEC
EXEC SQL
DECLARE cursortest CURSOR FOR DYNAMIC_SQL
END-EXEC
However, it fails compile with the following error: "ES0100 Duplicate cursor name: cursortest"
I am using NetExpress 5.1 version f.110.0022 and SQLServer 2012.
#SQLserver
#SQL
#EXECSQLEXECUTE
#cobolnetexpress
#MicroFocusCOBOL