Op 2010-06-24 02:02, Alan T het geskryf:
> 
> How the OIDInteger be implemented?
> Is that integer generator for each table or on pc basis? 


OIDInteger uses the Ambler Low/High method (Google can give you more
information about Ambler). It uses a database table called Next_OID which
must contain one field named OID of type Integer. The generator grabs a 100
id's at a time - this value is configurable in the source code
(tiOIDInteger.pas around line 170). This minimises the amount of times the
generator needs to visit the database and update the Next_OID table, giving
it a bit of a performance boost when you do lots of inserts. The generator
works for the whole database by default (I think this could be changed as
well - not 100% sure, but do remember reading something about this years ago).

To use this OID generator, simply assign it to the global OPFManager
instance as follows:


  GTIOPFManager.DefaultOIDGenerator := TtiOIDGeneratorInteger.Create;


NOTE:
  Remember that you need to create the Next_OID table yourself.


Regards,
  - Graeme -


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
tiOPF-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tiopf-talk

Reply via email to