Bug In DB-Access with IUS
Posted in 1997
Hi to all Informix Universal Server users.
I think I have uncovered a bug in the version of DB-Access that comes
with IUS.
I tried the example from the manual - "Informix Guide to SQL: Tutorial -
Version 9.1",
chapter 12, page 12-19, for inserting a row into a table that contains a
collection type column.
The table definition is on page 12-14 of the same manual, and is as
follows:
CREATE TABLE manager (
mgr_name VARCHAR(30),
department VARCHAR(12),
direct_reports SET(VARCHAR(30) NOT NULL),
projects LIST(ROW(pro_name VARCHAR(30),
pro_members SET(VARCHAR(20) NOT
NULL)) NOT NULL)
);
The "insert" statement I tried was:
INSERT INTO manager (
mgr_name,
department,
direct_reports,
projects)
VALUES (
'Sayles','marketing',
"SET{'Simonian','Waters','Adams','Davis','Jones'}",
"LIST{
ROW('voyager_project',
SET{'Simonian','Waters','Adams','Davis'}),
ROW('horizon_project',
SET{'Freeman','Jacobs','Walker','Smith','Cannan'}),
ROW('saphire_project',
SET{'Villers','Reeves','Doyle','Strongin'})
}"
);
The CREATE TABLE command executed without error and the table was
created.
But, when I execute the above INSERT statement, I get the following
error:
282: Found a quote for which there is no matching quote
and the double-quote preceding the word LIST is indicated.
Now if I don't break up the LIST part with new lines (i.e. one
continuous line from the first
double-quote to the second double-quote), then the statement gets
executed without error.
I feel that one should be able to write the above INSERT statement in
free format,
as is written above, and that DB-Access should be able to find the
matching quote,
even if it is on the next line.
Has anyone else had a similar experience that he/she is willing to share
with me?
Is there something I have missed with regard to DB-Access?
Any assistance greatly appreciated.
Thanks In Advance,
Avi.
************************************************************************
/\\ \\ /| Avi Abrami, Analyst/Programmer, Telegate Ltd.
/__\\ \\ / | 7 Haplada Street, Or-Yehuda, ISRAEL
/ \\ \\/ | Phone:+972-3-5388717 Fax:+972-3-5335877 eMail:avia@telegate.co.il