Invoking Java methods in Adaptive Server  SQLJ user-defined functions

Chapter 5: SQLJ Functions and Stored Procedures

Using Sybase Central to manage SQLJ functions and procedures

You can manage SQLJ functions and procedures from the command line using isql and from the Adaptive Server plug-in to Sybase Central. From the Adaptive Server plug-in you can:

The following procedures describes how to create and view the properties of a SQLJ routine. You can view dependencies and create and view permissions from the routine’s property sheet.

StepsCreating a SQLJ function/procedure

First, create and compile the Java method. Install the method class in the database using installjava. Then follow these steps:

  1. Start the Adaptive Server plug-in and connect to Adaptive Server.

  2. Double-click on the database in which you want to create the routine.

  3. Open the SQLJ Procedures/SQLJ Functions folder.

  4. Double-click the Add new Java Stored Procedure/Function icon.

  5. Use the Add new Java Stored Procedure/Function wizard to create the SQLJ procedure or function.

    When you have finished using the wizard, the Adaptive Server plug-in displays the SQLJ routine you have created in an edit screen, where you can modify the routine and execute it.

StepsTo view the properties of a SQLJ function or procedure

  1. Start the Adaptive Server plug-in and connect to Adaptive Server.

  2. Double-click on the database in which the routine is stored.

  3. Open the SQLJ Procedures/SQLJ Functions folder.

  4. Highlight a function or procedure icon.

  5. Select File | Properties.





Copyright © 2005. Sybase Inc. All rights reserved. SQLJ user-defined functions

View this book as PDF