Re: HELP PLEASE - Informix SQL Error -479
Posted in 1997
On Fri, 19 Dec 1997, Michael Wendel wrote: > The message received reads as follows : > > EXECUTE Cannot prepare statement: stmtFldP : SQL: -479: The number of > DESCRIBED columns is greater than the allocated space. > > I am using Perl DBI to do INSERT INTO on the table rows in my database. > This particular table has 261 columns,row size 2107 > > Is this table too big? If not, how can i find out what descriptors exist > in the database so I can change them via the ALLOCATE DESCRIPTOR command > so I can grab all 261 columns. One of the nastier features of the SQL DESCRIPTOR system is that you have to know in advance how many columns you might need to describe. Somewhere in dbdimp.ec there's a line which says: EXEC SQL ALLOCATE DESCRIPTOR :nm_obind WITH MAX 128; It's line 1155 in my current version. Change the 128 to some suitable larger number, such as 261... Or hack the code to do something more intelligent and send me the result. Or really hack the whole of the code to use sqlda structures instead of SQL DESCRIPTORS and send me that! Thanks -- that'd be a wonderful Christmas present, and I don't mind if it's a day or two late. Yours, Jonathan Leffler (johnl@informix.com) #include <witticism.h>