How do I execute a procedure or function written in VB from an Oracle trigger?
Unfortunately, Oracle does not include any native way to execute VB code from within the database. This includes triggers, functions, procedures, and any PL/SQL block. Oracle does provide the ability to run external C++ routines and Java within the database. In order to run the VB code, you'll have to make your trigger run either an external C++ routine or Java and then have that routine run your VB code as host callout. The AskTom Web site has some good examples of both of these.
For More Information
- Dozens more answers to tough Oracle questions from Brian Peasland are available.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.