Subject Re: [IBO] Digest Number 1525
Author Rhett Rodewald
Jason,

I will forward it when I get it working to my satisfaction. AFAIK, The
part that is missing from IBO is the part that increments the items in the
IBO$SCHEMA_VERSION table. If these items are incremented appropriately,
then IBO seems to handle changes after that.

Right now, my code just creates generators (IBO$SCHEMA_GEN_xxx) for each
schema cache item, and then I manually increment the appropriate items
whenever I modify then metadata with my "UpdateSchema" procecdure. The
important part is this:

ExecuteDML(Format('UPDATE IBO$SCHEMA_VERSION SET VERSION_NUMBER =
GEN_ID(IBO$SCHEMA_GEN_%s,1) WHERE SCHEMA_ITEM = ''%0:s''',
[FieldByName('SCHEMA_ITEM').AsString]), nil);

The part that really needs to be added is to automatically increment these
generators in IBO without a seperate call to my "UpdateSchema" procedure.
I realize that this means parsing the SQL -- but I'm sure it is doable.
Just may be a while before I get around to it.

To be frank, I don't see the need for the table at all, except that it is
perhaps faster to query than the generators. Otherwise, the
IBO$SCHEMA_VERSION table could be replaced by using the generators
directly. I have noticed that it is a fairly slow operation to create the
generators in the first place, I'm not sure of the speed differences
between querying the table or accessing the generators instead.

--Rhett

P.S. Does anyone know if it is possible to post to the newserver
(news.atkin.com)? I keep getting rejected and have to e-mail to
ibobjects@yahoogroups.com instead. I thought the newsserver was supposed
to allow posting if you were on the list? TIA!


On Sat, 28 Jun 2003 16:40:47 +0000 (UTC), IB Objects
<jwharton@...> wrote:

> Rhett,
>
> I would be interested in your changes. Also, there is somewhat of an
> implementation to have the database track schema cache versions and
> update
> itself automatically. It was contributed code that I merged in so I'm not
> as
> intimately familiar with it as code I write myself. Perhaps you can pick
> up
> on it and see how it matches with yours?
>
> Jason Wharton
>
>
>
> ___________________________________________________________________________
>
>
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
>
>
> http://www.ibobjects.com - your IBO community resource for Tech Info
> papers,
> keyword-searchable FAQ, community code contributions and more !
>