Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- db_VISTA III - d_dconnect http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   D_DCONNECT

SUMMARY
   d_connect(SET [,dbn])
   int SET;
   int dbn;

ARGUMENTS
   SET         The set type to whitch current record is to be connected.
   dbn         (optional)The number of the database containing the record

DESCRIPTION
    Function d_connect will connect the current record to the current owner of
    SET. It is placed into SET in the order specified in the DDL for the
    database. Upon successful completion, the current recordwill become the
    current member of set.

CURRENCY CHANGES
    curr_mem[set]=curr_rec;

RETURN CODES
   -2    S_INVSET      Invalid set type.Probably passed a record type
                       instead of a SET type.

   -7    S_NORC        The current record is null.

   -8    S_NOCO        The current owner for the specified set is null. Find
                       the correct owner record occurrence and set the current
                       owner of SET to the located record (e.g. using function
                       d_setor).

   -14   S_ISOWNED     The current record is already owned as a member of SET.
                       If you are trying to change a set connection, you first
                       need to disconnect the record from the current owner,
                       set the current ownet of SET to the new owner record
                       and then connect the current record to new owner
                       record.

   -31   S_NOTRANS     In shared mode, changes can only be made from within a
                       transaction except when the affected files are
                       exclusive locked.

EXAMPLE
   struct info irec;    /* tech.info record */
   ..
   /* make author record current owner of has_published */
   d_setor(HAS_PUBLISHED);
   ..
   /* create new info record */
   if ( d_fillnew(INFO,&irec) == S_OKAY )
      /* connect new record to has_published set */
      d_connect(HAS_PUBLISHED);

See Also: d_discon d_disdel

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson