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. > >> I'm not sure weather it will impact any parts of TIBConnection, so >> I will leave it to the fcl-db governors to decide. > > Can you attach a patch to the bug-report? And maybe give your real name > so we can add that to the svn-log? (In the case that 'Funky Beast' is > your real name, my apologies. ;) ) > > Joost. > Should the patch be created for trunk or fixes_22 (I was using fixes_22 to test). Regards, Funky Beast _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal