Joost van der Sluis wrote:
> Op vrijdag 20-03-2009 om 22:38 uur [tijdzone +0800], schreef Funky
> Beast:
> 
>> I've found a bug in sqldb/firebird.
>> Its reported here, with sample project to reproduce:
>> http://bugs.freepascal.org/view.php?id=13340
> 
> You are using one TSQLQuery object for all sorts of actions. Try to
> create a new TSQLQeury for every sql-statement you execute. See if that
> helps.
> 
> And firebird doesn't allow sql-statements which changes the database
> (like alter table) within the same transaction as a select-statment. Are
> you sure you're not doing this?
> 
> And the comparision with flamerobin and such is useless. In flamerobin
> you're not running this program which does a lot of strange things.
> 
> Try a simple program which only does a 'select * from table' - You'll
> see that it will work.
> 
> ie: debug your program and try to isolate the bug.
> 
> Joost.
> 
> 
> _______________________________________________
> fpc-pascal maillist  -  
> fpc-pascal-pd4fty7x32k2wbthl531ywd2fqjk+...@public.gmane.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 

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.

I'm not sure weather it will impact any parts of TIBConnection, so
I will leave it to the fcl-db governors to decide.

Regards,
Funky Beast
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to