What is an Advantage Extended Procedure?

Advantage Concepts

Compared to Traditional Stored Procedures

In order to understand the flexibility and benefits that Advantage Extended Procedures offer, let’s take a look at traditional stored procedures. Some database engines provide functionality for database administrators to encapsulate a set of database commands that perform logical tasks from the server. This encapsulated code is called a stored procedure.

Typically, stored procedures are written in the language of the server. They run independent of an application and generate predefined output when called from an application. By placing the execution code as close to the data as possible, data-intensive calls and tasks from the client are handled swiftly and efficiently on the server, without bogging down the network.

However, traditional stored procedures have a few drawbacks:

Move to a New Level of Database Development

The Advantage Database Server streamlines the creation and use of stored procedures. Like other products on the market, Advantage Database Server allows you to develop stored procedures that enable you to quickly execute logical tasks as they are performed on the server where the data is located. Unlike other products on the market, however, you can take full advantage of your existing development products and knowledge to write and execute stored procedures on the fly. There’s no downtime needed to familiarize you with a custom add-in or scripting language. Developers write and maintain the stored procedures themselves. Because our version of stored procedures goes above and beyond what traditional stored procedures can do, we’ve named them "Extended Procedures".

And there are no limits to what you can do with Advantage Extended Procedures. But why would you want to include them in your application development? Here are some of the most compelling reasons:

Note Advantage Extended Procedures will not be executed on the server with the Advantage Database Server for NetWare. When connected to a NetWare server, Advantage will "scale back" and run the Extended Procedure from the client. This allows you to write a single application that will utilize the benefits of executing Advantage Extended Procedures on the server when connected to non-NetWare servers, while still having support for NetWare servers by running the Extended Procedure on the client.

Power of Extended Procedures Exposes Server to Risks

Advantage loads Extended Procedures as in-process DLLs. This provides the best performance, but also exposes the Advantage server to any errors inside your procedures. If for example a procedure overwrites memory, it will be overwriting memory in the Advantage server process, not just in the procedure DLL. Also if a procedure DLL is not thread-safe, it can expose the server to many problems because the Advantage server is a multi-threaded process, this can also result in server crashes. Great care must be taken when writing Extended Procedures to ensure the integrity of the Advantage server.