September 25, 2008, 02:43 PM
Lou DeTotaChecking Embeded SQL
How does one go about checking the result or return code of an embeded SQL statement ?
September 25, 2008, 03:44 PM
Francis MarianiIf 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