DBGetStream

(Engine-Level Function)

Maintained only to provide backward compatibility with legacy applications. Do not use in new code.

Description: Converts a database to a stream, and returns an indication of parameter errors.
Returns: Numeric
Usage: Script
Function Groups: Database and Data Source,  Stream and Socket
Related to: DBAdd | DBInsert | DBListGet | DBListSize | DBRemove | DBSystem | DBTransaction | DBUpdate | DBValue
Threaded: Yes
Format: DBGetStream(DBSysVal, Stream [, Timestamp])
Parameters:  
DBSysVal   
Required. The database value to use. This is the return value from a DBSystem call.
Stream  
Required. Any variable in which the stream containing the database will be returned.
Timestamp   
Optional. An optional parameter that is any numeric expression indicating the earliest timestamp to include in the stream. Only database records with date/time values greater than or equal to this parameter will be returned.
Comments: The return value for this function indicates if its key parameter (DBSysVal) is invalid

If DBSysVal is valid, DBGetStream will immediately return a value of false (0).
If DBSysVal is invalid, DBGetStream will not perform the required operation, and will instead immediately return a value of 1.

Note that the return value only signals completion of the function's execution if it is true.
Because the value of the Stream parameter is created from a database's file, the DBSystem function that created the database had to have a valid first parameter (the file name in which the database contents are stored).
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:

  Db = DBSystem("", "", 0, 0, 32 { key }, -3 { pressure },
                  3 { level }, -3 { temperature }); 
  If Valid(Db) && ! Done;
  [
    Done = 1; 
    DBGetStream(Db { Database to use }, 
                Result { Returned stream value }); 
  ]