Figure 20-10. Oracle client-side runtime environment invoking a stored procedure

Figure 20-10. Oracle client-side runtime environment invoking a stored procedure - student2.ru

As illustrated, the client-side runtime environment—which may actually be running on a middle tier, such as an Oracle Forms "server"—communicates with both the server-side PL/SQL runtime and the server's SQL processing components. The remote procedure calls don't require the server to read the DIANA of any called programs in order to determine whether the referenced program has changed, as discussed earlier in Section 20.2.4 of this chapter.

One of the great things that Oracle has done with the application development tools is to provide a wide range of extended functionality via built-in packages. So, on the client computer, for example, you can use PL/SQL to do things like:

· Define the behaviors of triggers that fire on events such as mouse clicks

· Provide data entry assistance to the user by encoding automatic lookups and data validation

· Specify what will happen when the user selects an item from a pull-down menu

· Store and retrieve data in local files using the TEXT_IO package

· Programmatically alter behavior and visual characteristics of user interface widgets

Up through Developer 6i, you could also use PL/SQL to interact with the client operating system. For example, on Microsoft Windows you could call DLLs directly, use OLE (Object Linking and Embedding) features, or make calls to the Windows API. Oracle eliminated those Microsoft-specific features in Developer 9i, though. No comment.

Fortunately, making direct calls to server-side PL/SQL from the client PL/SQL environment is subject to only a few gotchas. For starters, because the client version of PL/SQL is released on a different schedule from the server version, you cannot always assume that some particular language feature is available. You need to be aware of what version of PL/SQL you have on the client.

Наши рекомендации