You can call a function in an external Dynamic Link Library (DLL) from a stored procedure or user-defined function. You can call functions in a DLL under Windows XP or Windows 2000 operating systems and in a shared object on UNIX.
This section describes how to use the external library calls in procedures.
WARNING! External libraries can corrupt your database. External libraries called from procedures share the memory of the server. If you call a DLL from a procedure and the DLL contains memory-handling errors, a server failure can occur or your database can become corrupted. Ensure that your libraries are thoroughly tested before deploying them on production databases.
When you call a function in an external DLL, you cannot take advantage of the performance features of Sybase IQ. Queries that call external functions will run at least 10 times slower than queries without them.
The API described in this section replaces an older API. Libraries written to the older API, used in Sybase IQ versions before 12.4.3, are still supported, but in new development you should use the new API.
Sybase IQ includes a set of system procedures that make use of this capability, for example to send MAPI e-mail messages. These extended system procedures are identical to those in Adaptive Server Anywhere 9.0.1. For information on extended system procedures, see the chapter “System Procedures and Functions” in the Adaptive Server Anywhere Reference Manual.