>  Docs Center  >  Libraries  >  ASTROLIB  >  DBBUILD






Build a database by appending new values for every item.


The database must be opened for update (with DBOPEN) before calling
DBBUILD. This version for IDL V6.1 or later.

Calling Sequence

DBBUILD, [ v1, v2, v3, v4......v50, /NOINDEX, /SILENT, STATUS = ]


v1,v2....v50 - vectors containing values for all items in the database.
        V1 contains values for the first item, V2 for the second, etc.
        The number of vectors supplied must equal the number of items
        (excluding entry number) in the database. The number of elements
        in each vector should be the same. A multiple valued item
        should be dimensioned NVALUE by NENTRY, where NVALUE is the number
        of values, and NENTRY is the number of entries.

Optional Input Keywords

/NOINDEX - If this keyword is supplied and non-zero then DBBUILD will
            *not* create an indexed file. Useful to save time if
            DBBUILD is to be called several times and the indexed file need
            only be created on the last call
/SILENT - If the keyword SILENT is set and non-zero, then DBBUILD
will not print a message when the index files are generated

Optional Output Keyword

STATUS - Returns a status code denoting whether the operation was
successful (1) or unsuccessful (0). Useful when DBBUILD is
called from within other applications.


Suppose a database named STARS contains the four items NAME,RA,DEC, and
FLUX. Assume that one already has the four vectors containing the
values, and that the database definition (.DBD) file already exists.
IDL> !PRIV=2 ;Writing to database requires !PRIV=2
IDL> dbcreate,'stars',1,1 ;Create database (.DBF) & index (.DBX) file
IDL> dbopen,'stars',1 ;Open database for update
IDL> dbbuild,name,ra,dec,flux ;Write 4 vectors into the database


Do not call DBCREATE before DBBUILD if you want to append entries to
an existing database
DBBUILD checks that each value vector matches the idl type given in the
database definition (..dbd) file, and that character strings are the
proper length.

Procedure Calls


Revision History

Written W. Landsman March, 1989
Added /NOINDEX keyword W. Landsman November, 1992
User no longer need supply all items W. Landsman December, 1992
Added STATUS keyword, William Thompson, GSFC, 1 April 1994
Added /SILENT keyword, William Thompson, GSFC, October 1995
Allow up to 30 items, fix problem if first item was multiple value
W. Landsman GSFC, July 1996
Faster build of external databases on big endian machines
W. Landsman GSFC, November 1997
      Use SIZE(/TNAME) for error mesage display W.Landsman July 2001
      Fix message display error introduced July 2001 W. Landsman Oct. 2001
      Make sure error message appears even if !QUIET is set W.L November 2006
      Major rewrite to use SCOPE_VARFETCH, accept 50 input items
                  W. Landsman November 2006
      Fix warning if parameters have different # of elements W.L. May 2010
      Fix warning if scalar parameter supplied W.L. June 2010
      Fix for when first parameter is multi-dimensioned W.L. July 2010
      Check data type of first parameter W.L. Jan 2012

© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us