Joost van der Sluis wrote: > Op zondag 22-03-2009 om 18:40 uur [tijdzone +0800], schreef Funky Beast: >> Joost van der Sluis wrote: >>> Op zondag 22-03-2009 om 17:37 uur [tijdzone +0800], schreef Funky Beast: >>>> I found the culprit. >>>> >>>> In TIBConnection.PrepareStatement's variable section, x was declared >>>> as a shortint >>>> which would cause problem when its used for allocating memmory for the >>>> SQLVAR elements, >>>> when there are more than 128 fields. >>>> >>>> Also same as above in TIBConnection.FreeSQLDABuffer. >>>> >>>> I changed var x in both location into smallint and everything worked >>>> fine for me. >>> You are sure that a smallint is large enough in all cases? >> I'm not sure, but according to: >> http://www.firebirdsql.org/index.php?op=guide&id=techspec >> the approximation of maximum 16,384 integer fields could be allowed per >> table, >> and smallint has a range of -32768..32767, double of whats stated. >> Unless someone has more columns of smaller size data. >> >> Please let me know the ideal type before I prepare the patch. > > It's up to you to decide, but as you stated smallint seems ok. > > >> Should the patch be created for trunk or fixes_22 (I was using fixes_22 to >> test). > > In principle all patches should be made against trunk. But in this case > I don't suspect many differences so a patch against fixes will probably > also work. And else I can convert it. > > Joost. > > _______________________________________________ > fpc-pascal maillist - > fpc-pascal-pd4fty7x32k2wbthl531ywd2fqjk+...@public.gmane.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal >
Done. Regards, Funky Beast _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal