Subject Re: [IBO] Handling shared tables among databases
Author Hianoto Santoso
Hello Geoff,

On 15 Feb 2002 at 17:17, Geoff Worboys (TeamIBO) wrote:

> Are you using native or TDataset stuff ???
> Presuming native...

Yes, I am using Native stuffs :)

> You need a TIB_Connection for each database.
> You need a single TIB_Transaction - connect it to each TIB_Connection
> involved in the sharing.
> Create a TIB_Query for each table - attach to the appropriate
> TIB_Connection and to the shared TIB_Transaction.
> The SQL in the query can only relate to one database.
> However you can apply master-detail links between the queries from
> multiple databases and since master-detail can be one-to-one this
> gives you the ability to apparently "join" the data - although not use
> it in a single grid :-(
> You can also do lookups across databases in a similar manner.
> By using the shared transaction you take advantage of IB/FB's
> "two-phase commit" capability, where changes across multiple databases
> are all committed or all rolled back.
> Is that what you wanted?

No, I am afraid this is not what I wanted...

See, in System.gdb I have tables, i.e. Currency, Unit, Dept, etc...

In other databases, I need the same info from those shared tables.

In Access, we are able to create a 'shadow' table from external source using Link
Table, which can be table from other Access database, or even other Excel
database, and it will be updated automatically whenever somebody updates the
external source.

Now, I am just wondering whether is it possible to do the same thing with IB/FB and
IBO ?? If not possible, then I think I have to create tables in those databases with
the same structure, and insert/update/delete the changes made in the System.gdb

It will arise another problem for me, how to detect the SQL statement generated by
IBO when we are inserting/updating/deleting, so I can simply assign the SQL while
changing the IB_Connection only...