fgldbsch fails with error code -284

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

fgldbsch
fglcomp

Rate this page:

(0 users)Average rating

Document information


More support for:

Informix Tools
Informix Genero

Software version:

2.4

Operating system(s):

Linux, Windows

Reference #:

1621244

Modified date:

2012-12-27

Translate my page

Machine Translation

Content navigation