Subject Re: [firebird-php] Re: Problem creating tables
Author Lester Caine
sc_odo wrote:

> Alan, your question about committing transactions after every
> statement was a good one.
> I added some code to start & commit transactions in each loop and
> tried again. Now I'm getting a warning from ibase_commit starting
> after the 9th table that was successfully created:
> ibase_commit(): unsuccessful metadata update new record size of 96124
> bytes is too big TABLE KASSA_0 in
> /srv/projects/adodb/drivers/ on line 154

Maximum row size is 64kb so there are too many large fields in that
table. If there is a large text field it may be worth moving it to a
blob? Otherwise break the table in two and just access one half or the

> What I don't understand is why the creation of the table doesn't
> return an error.

ADOdb is set to be silent on errors so that you don't have to keep
handling situations such as 'record not found' crashing the script. Just
take off the '@' if you want the error, or better still, the create
functions do normally give a 'false' reply if the SQL did not complete.
We do run an extra check though in bitweaver, and try to read from a
table to ensure it exists and has not been deleted outside the program ;)

> Does this warning mean that this table has too many fields or does the
> field size exceed maximum size?

It's the number of bytes needed by the fields rather than the number of
fields. You will need to either reduce the varchar fields, or split the
table. Using multiple tables with links together is better than one
large table.

Lester Caine
L.S.Caine Electronic Services
Treasurer - Firebird Foundation Inc.