DBValue

Description:              This function returns a certain value retrieved from a VTS database.

Returns:                    Numeric

Usage:                       Script or Steady State

Format:                      DBValue(DBSysVal, IDKey, FieldNumber)

Parameters:             DBSysVal   { handle }  { required }  { no default }
          The database value to use; this is the return value from a DBSystem call.

                                    IDKey    { text }  { required }  { no default }
          Any text expression that designates the record to use; it can contain the wildcard characters "*" and "?".

                                    FieldNumber     { numeric }  { required }  { no default }
          Any numeric expression that indicates the field for which data is requested. Valid values for FieldNumber are as follows:

Value 

Meaning

Event code for the record

1 to 255

 Indicates which piece of the user's data you wish to retrieve.

 

Comments:               Unlike most of the other database statements, this function is not threaded; execution of all other statements will wait until this statement has completed execution and returned its result.

                             If no records matching IDKey are found, the return value will be Invalid.

                             If the database file has its read-only attribute set when this function is executed, it will be cleared automatically by execution of the function.

Example:

myDB = DBSystem(dbFile, "", 0, 0, 16 { key }, 2 { field 1 },

                3 { field 2 }); 

If Valid(DBValue(myDB { Database to use },

         "Motor_67" { ID key }, 

         1 { Field to get value from }) Next; 

[

  ... 

]

See Also:

DBAdd | DBListGet | DBListSize | DBRemove | DBSystem | DBTransaction | DBValue