From: Claudio V. C. <cv...@us...> - 2001-06-30 22:21:29
|
> -----Original Message----- > From: fir...@li... > [mailto:fir...@li...]On Behalf Of Frank > Schlottmann-Goedde > Sent: Viernes 29 de Junio de 2001 12:04 > To: fir...@li... > > > There is another failure in CF_ISQL_14 where > > > > create table t5 (af computed by (1+2)); > > insert into t5 values(10); > > > > will fail with > > > Statement failed, SQLCODE = -804 > > > > > > Dynamic SQL Error > > > -SQL error code = -804 > > > -Count of columns does not equal count of values > > > > > > > instead of > > > > < Statement failed, SQLCODE = -151 > > < > > < attempted update of read-only column Some weeks ago, the firebird queen (the same that shared dolls with Ada Lovelace in her infancy <g>) asked me to provide a modification to allow the following to happen: create table tc(a int, b computed (a + 1)); commit; insert into tc values(a); In few words, for lazy people, to allow them insert in a table without writing the list of fields EVEN THOUGH the table has computed fields, that will be ignored. Now, you come with the paroxysm of the test cases, emulating a fool that wants to insert a value in the unique and read-only field of the table. Well, I have two suggestions: - Is there any damage if I add a SHORT or USHORT to the struct req is dsql.h? I think SSHORT is enough since the limit of field count in a table is 32767. This field, called req_computed_fcount would be augmented in define_insert_action(), so instead of my code if (field->fld_flags & FLD_computed) continue; it will be if (field->fld_flags & FLD_computed) { ++request->req_computed_fcount; continue; } hence by the time an error condition is detected: if request->req_computed_fcount is > 0 then the message Ann wants is shown else the traditional message Frank loves is shown. Flames, diatribes, flack? Anyway, do I need to create a new error message, Ann? I never have seen the one you describe. C. |