January 13, 2005, 10:39 AM
HåkanREADLIMIT does not generate FETCH FIRST
According to the doc, one of the new features of 5.2.3 is that the DB2 adapter should generate a FETCH FIRST when issuing a READLIMIT test.
This is the Focexec:
TABLE FILE ADS_BDS_VW
PRINT BRANCH_KEY
IF READLIMIT EQ 2
END
and this is what was sent to DB2:
SELECT T1."BRANCH_KEY" FROM ADWDEVDTA/"ADS_BDS_VW" T1 FOR
FETCH ONLY OPTIMIZE FOR 2 ROWS;
We're on WF 5.2.7 on IBM iSeries (AS/400) 5.2
Is there some parameter that has to be set for the adapter to generate FETCH FIRST?
Tia
Hakan
January 14, 2005, 08:06 PM
<Ephraim>3 options:
1) Use CLI configuration of DB2 adapter (preferable option because in future CLI will become the only available configuration).
2) Preceede your TABLE request with the following command:
SQL DB2 CONNECT;
3) Preceede your TABLE request with the following command:
SQL DB2 SET SQLVVRRM QSQ05011
Do not use a combination of these options.
January 20, 2005, 07:37 AM
HåkanEphraim,
thanks a lot. Both option 2 and 3 worked fine.
/Hakan