Description

Programmatically loads a DBT file.

Syntax

error = RTI_LOAD_DATABASE( databaseID )

Parameters

The function has the following parameters:

ParameterDescription
databaseIDThe database name to load.

Returns

Boolean. If successful null is returned. If there is an error a boolean true is returned.

Remarks

The RTI_LOAD_DATABASE function uses Set_Status() to set error codes. To determine the error received use Get_Status() after the RTI_LOAD_DATABASE call.

Example

* Load MYDB.DBT
error = RTI_LOAD_DATABASE( "MYDB" )
if error then
   status = Get_Status(errCodes)
   call FsMsg( errCodes )
end
  • No labels

1 Comment

  1. Per Bob Carten:

    There is actually a second parameter which allows you for force @DBID to match the @APPID rather than the dbt.  We added that for someone whose code assumes that @APPID and @DBID are interchangeable.  I've updated the wiki.

    function rti_load_database(databasename, bUseAppIdforDBid)

         /*
         **  databasename     (in) = name of dbt file, without the suffix
         **  bUseAppIdforDBid (in) = flag, true to set @dbid = @appid<1>, false to set @dbid = databasename
         **                          defaults to false.