To access the Java methods in the class, you must create stored procedures or functions that act as wrappers for the methods in the class.
To call a Java method using Interactive SQLCreate the following SQL stored procedure to call the Invoice.main method in the sample class:
CREATE PROCEDURE InvoiceMain( IN arg1 CHAR(50) ) EXTERNAL NAME 'Invoice.main([Ljava/lang/String;)V' LANGUAGE JAVA; |
This stored procedure acts as a wrapper to the Java method.
For more information about the syntax of this statement, see CREATE PROCEDURE statement (external procedures).
Call the stored procedure to call the Java method:
CALL InvoiceMain('to you'); |
If you examine the database server message log, you see the message "Hello to you" written there. The database server has redirected the output there from System.out.
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |