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_renfile http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   D_RENFILE

SUMMARY
   d_renfile(dbname,FILEID,filenm)
   char *dbname;
   int FILEID;
   char *filenm;

ARGUMENTS
   dbname      The name of the database for which the file is to be renameb

   FILEID      The DDL file id for the file to be renamed.

   filenm      The new file name.

DESCRIPTION
   This function will inform db_VISTYA of a change in the name of file FILEID
   in database dbname. FILEID is the file identifier constant defined in the
   database dictionary file dbname.dbd and generated dy ddlp when the
   "fileid = filename" clause occurs in a data or key file statement in the
   DDL. Function d_renfile must be called prior to a call to d_open. When the
   database is opened, the new file name, filenm, will replace the name
   specified in the DDL in the file table dictionary entry so that all
   database I/O to that file is performed against the new file.

   The name of the batabase needs to be specified in the d_renfile call in
   order to distinguist between files contained in different database in case
   more than one is opened.

------------------------------------------------------------------------------
NOTE
   The file specification provided in the d_rebfile call overrides the use of
   either enviroment variables or a pach prefix the database name on d_open in
   the locating of database files (the dictionary and control file specifica-
   tions, however, are unaffected ).
------------------------------------------------------------------------------

CURRENCY CHANGES
   None.

RETURN CODES

    -1      S_DBOPEN       Database is open. Function called after d_open.

EXAMPLE

   DDL:
    database tims {
           data file timsdat = "tims.dat" contains ...;
           key  file timskey = "tims.key" contains ...;
           ...

   CCODE:
     d_renfile("tims",TIMSDAT,"raima.dat");
     d_renfile("tims",TIMSKEY,"raima.key");
     d_open("tims","x");

See Also: d_dbdpath d_dbfpath d_open

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