11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SYSTEM.DATE_THRESHOLD system variable<br />

Syntax<br />

SYSTEM.DATE_THRESHOLD<br />

Description<br />

SYSTEM.DATE_THRESHOLD represents the database date requery threshold. This variable works in<br />

conjunction with the three system variables $$DBDATE$$, $$DBDATETIME$$, and $$DBTIME$$,<br />

and controls how often <strong>Form</strong> <strong>Builder</strong> synchronizes the database date with the RDBMS. The value of this<br />

variable must be specified in the following format:<br />

MI:SS<br />

Because frequent RDBMS queries can degrade performance, it is best to keep this value reasonably high.<br />

However, keep in mind that if the value is not synchronized often enough, some time discrepancy can<br />

occur. In addition, if you are building a client/server application, the performance implications of<br />

SYSTEM.DATE_THRESHOLD could vary depending on the complexity of your network<br />

configuration.<br />

Default<br />

01:00 (Synchronization occurs after one minute of elapsed time.)<br />

This does not mean that <strong>Form</strong> <strong>Builder</strong> polls the RDBMS once every minute. It means that whenever<br />

<strong>Form</strong> <strong>Builder</strong> needs to generate the value for the system variables $$DBDATE$$, $$DBDATETIME$$,<br />

$$DBTIME$$, or SYSTEM.EFFECTIVE_DATE, it updates the effective date by adding the amount of<br />

elapsed time (as measured by the local operating system) to the most previously queried RDBMS value.<br />

If the amount of elapsed time exceeds the date threshold, then a new query is executed to retrieve the<br />

RDBMS time and the elapsed counter is reset.<br />

Usage Notes<br />

If a form never references the database date, <strong>Form</strong> <strong>Builder</strong> never executes a query to retrieve the<br />

RDBMS date, regardless of the value of SYSTEM.DATE_THRESHOLD.<br />

The operating system clock and the RDBMS clock rarely drift by more than one or two seconds, even<br />

after hours of elapsed time. However, since your database administrator can reset the RDBMS clock at<br />

any time, it is safest to set the threshold no higher than a few minutes.<br />

Often, a <strong>Form</strong> <strong>Builder</strong> block may contain multiple references to these $$DBDATE$$,<br />

$$DBDATETIME$$, or $$DBTIME$$ defaults. By setting SYSTEM.DATE_THRESHOLD to the<br />

default of one minute, nearly all such references in a form can be satisfied with a single query of the<br />

RDBMS.<br />

388

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!