Highlighted
New Member.
1153 views

AcuSQL

Hello!

I am trying to fetch some data from my remote server but i get SQLCODE -1 when i execute the Perfrom until

*
LIST-ROWS.
MOVE "Fetch data..." TO W-BX-STATUS
DISPLAY SR10

EXEC SQL
DECLARE COBCUR1 CURSOR FOR
SELECT
C_NUMBER,
C_NAME,| COLLATE greek_general_ci,
C_BIRTHDAY,
C_INFO
FROM EL_SXEDI
WHERE C_NUMBER >= 0
END-EXEC.

EXEC SQL
OPEN COBCUR1
END-EXEC.

Perform until SQLCODE not equal 0

EXEC SQL
FETCH COBCUR1 INTO :C-RECORD
END-EXEC
IF sqlcode EQUAL 0
MOVE C-NUMBER TO D-NUMBER
MOVE C-NAME TO D-NAME
MOVE C-BIRTHDAY TO D-BIRTHDAY
MOVE C-INFO TO D-INFO
MODIFY SR10-Gd-1, RECORD-TO-ADD = W-GRID-RECORD
MOVE W-GRID-RECORD TO W-BX-STATUS
DISPLAY SR10
end-if
end-perform.

EXEC SQL
CLOSE COBCUR1
END-EXEC.

MOVE "Fetch Complete..." TO W-BX-STATUS
DISPLAY SR10
.

Tags (3)
0 Likes
1 Reply
Highlighted
Absent Member.
Absent Member.

RE: AcuSQL

Check what SQLERRMC has, it will give you more information on what the error is.

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.