Technote (troubleshooting)
Problem(Abstract)
When using fgldbsch to export the schema of a database fgldbsch failed with error code -284.
Symptom
fgldbsch is stopped with following error message:
-------------------------------------------------
'fgldbslib.4gl', line number 1073.
SQL statement error number -284.
A subquery has returned not exactly one row.
------------------------------------------------
Cause
When the some user tables have column name "colattr" fgldbsch would fail. The root cause is an incorrect SQL using in fgldbsch
Environment
Genero 2.40
Diagnosing the problem
An incorrect SQL cause the problem
Resolving the problem
1) Move to the directory where Genero is installed and set the environment. Example:
cd /my_genero_top_directory
. ./envgenero
2) Edit the copy of the file under $FGLDIR/src/fgldbslib.4gl and around line 1080 add the join information to the query that fails. The code will change from:
-- Make sure this version of IDS can have shadow columns
SELECT COLNAME INTO cn
FROM "informix".SYSTABLES T, "informix".SYSCOLUMNS C
WHERE T.TABNAME = 'syscolumns' AND C.COLNAME = 'colattr'
IF SQLCA.SQLCODE == 0 THEN
to
-- Make sure this version of IDS can have shadow columns
SELECT COLNAME INTO cn
FROM "informix".SYSTABLES T, "informix".SYSCOLUMNS C
WHERE T.TABNAME = 'syscolumns' AND C.COLNAME = 'colattr'
AND T.TABID = C.TABID #added line
IF SQLCA.SQLCODE == 0 THEN
3) recompile the file:
cd $FGLDIR/lib
cp fgldbslib.42m fgldbslib.42m.Original
fglcomp ../src/fgldbslib.4gl
4) Apply the same changes of point (2) to the file
$GSTDIR/bin/fgl/2.40.03/src/fgldbslib.4gl
5) then recompile this second file:
cd $GSTDIR/bin/fgl/2.40.03/lib
cp fgldbslib.42m fgldbslib.42m.Original
fglcomp ../src/fgldbslib.4gl
Related information
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.