Stanley Sinclair wrote:
Has the promise of stored procedures written in VB6 been fulfilled in 8.2?
If there special syntax, and where do I find it, and where are samples?
Would it be as efficient as, say, SQL?
See the documentation for LANGUAGE CLR routines. Also see the tech
notes, as there was an additional feature added to late to make the
books (EXECUTION CONTROL). Examples in both C# and VB.NET can be found
in the <install>/samples/.NET directory. Note you will need at minimum
the .NET 1.1 runtime installed on your server. The implementation is
currently Windows & Microsoft runtime only - MONO is currently not
supported.
LANGUAGE CLR routines can only run in FENCED mode. This is due to the
potential problems that were encountered with LANGUAGE JAVA routines
that IBM simply did not have time to test for in LANGUAGE CLR within the
V82 timeframe. Additionally, there's an unknown factor of how the JVM
and CLR would cooperate if they were present in the same processes -
having both routine types FENCED allows DB2 to isolate the two runtime
interpreters from each other for customer systems that use both. There
are plans to make both available in NOT FENCED mode in the future.
LANGUAGE SQL procedures run in trusted mode, and are generally the best
performing routines. However, they are limited to the options available
in the SQLPL language. LANGUAGE CLR provides the ability to run any
option available to any .NET language. Note however that depending on
the functionality you choose, you may need to adjust the EXECUTION
CONTROL clause of the routine.