Focal Point
Checking Embeded SQL

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5071035003

September 25, 2008, 02:43 PM
Lou DeTota
Checking Embeded SQL
How does one go about checking the result or return code of an embeded SQL statement ?


WF 7.6.11 PDF deployment, z/OS, WAS, Excel, PDF, HTML. FOCUS 7.6.11, same outputs.
September 25, 2008, 03:44 PM
Francis Mariani
If there is a SQL error, &RETCODE is returned with the SQL error code.

SET SQLENGINE=SQLMSS
-RUN

SQL
SELECT DateSSS FROM aadb.dbo.Time;
TABLE ON TABLE HOLD
END
-RUN

-TYPE RETCODE: &RETCODE

&RETCODE is 207.

The SQL error is:

 (FOC1400) SQLCODE IS 207 (HEX: 000000CF) XOPEN: 42S22
 : Microsoft OLE DB Provider for SQL Server: [42S22] Invalid column name 'D
 : ATESSSS'. [42000] Statement(s) could not be prepared. [] Deferred prepar
 : e could not be completed.
 L    (FOC1405) SQL PREPARE ERROR.



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server