Applies to: Oracle, MS SQL, MySql/MariaDB, PostgreSQL Drivers


set_attribute f2s_lazy_open_state of {DriverID} to {variable}
get_attribute f2s_lazy_open_state of {DriverID} to {variable}




The ID of the driver for which this applies. In most cases, you should use _f2s_ActiveDriverID.


Boolean variable. If true, lazy open is true. Default: false.


Setting this attribute to true enables an option known as “Lazy Open Mode”. When turned on the table’s metadata i.e. table, columns, index descriptions, is deferred until a field is accessed, even if a OPEN has already been done. This can significantly improve an application’s initial performance, especially when a large number of files are opened when the program is launched. By default, tables are set to open normally, but by setting this attribute to true, it can be altered to use this mode. Note that when this mode is activated, it effects all tables that are opened. To deactivate this feature, set this attribute to false at any time. This is the preferred method to activate or deactive this feature but it can also be set globally in the .INI file.

When to Use

If the program uses a large number of tables, setting this variant to true will shorten the startup time. For example, if the following is placed in the oApplication object of the .src file:

f2s_activate_driver "f2s_driver_using"
Login "localhost\SQLEXPRESS" "" "" _f2s_ActiveDriver
Set_Attribute f2s_db_name of _f2s_ActiveDriverId to "DatabaseName"
Set_Attribute f2s_lazy_open_state of _f2s_ActiveDriverId to True

The tables will not be opened until they are needed.



boolean bLazy
get_attribute f2s_lazy_open_state of _f2s_ActiveDriverID to bLazy


set_attribute f2s_lazy_open_state of _f2s_ActiveDriverID to true

Replaces: Command SET_OPEN_MODE: Note, the sytax is different. f2s_lazy_open_state uses a boolean. The obsolete command SET_OPEN_MODE used words DEFAULT and LAZY_MODE.