Traversing and Loading from an OID

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Feb 3 10:22:09 CST 2006


On 2/3/06 9:40 AM, "Philip Mötteli" <philip.moetteli at econophone.ch> wrote:

Hi Philip,

> You probably saw me coming with that one. :-)
 
> Lets say, I have an OID and an I_Database (and a table name). What
> would I have to do, if I want to load the associated record in the db
> (using VSDK C++)?

Actually you need only:

    I_Daatbase_Ptr  db
    some OID (8 bytes)

Note that 
    
    OID = (TableID << 32) + RecID


So you can extract TableID (4 bytes) from

    TableID tid   = (TableID) (OID >> 32);
    RecID   recid = (RecID) (OID & 0xFFFFFFFF);
    
Now to get table 

    I_Table_Ptr pTable = db.get_TableByID( tid )
    pTable->putRecID( recid. )


MAY BE there I sense add new function

    I_Table_Ptr I_Database::GoToRecord( OID )

Which will do this job ?

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list