GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • V15 Documentation
  • Privacy Statement
  • License Agreement
  • Contact Us

This view

  • Original page
  • New address

GeezerVison is showing docs.voltdb.com — B.2. Invoking Stored Procedures

  • Volt Active Data
  • Developer Hub
  • Books
    • VoltDB Tutorial
    • Using VoltDB
    • VoltDB Guide to Performance and Customization
    • VoltDB Administrator's Guide
    • Volt Kubernetes Administrator's Guide
    • VoltDB Quick Reference
  • Current docs ▶
  • VoltDB V15
    • VoltDB V16
    • VoltDB V15.3 LTS
    • VoltDB V14.3 LTS
    • VoltDB V13.3 LTS
    • VoltDB V12.3 LTS
    • VoltDB V11.4
    • VoltDB V10.2
    • VoltDB V9.3
B.2. Invoking Stored Procedures

Upgrade Guide

  • Preface▶
    • 1. Structure of This Book
    • 2. Related Documents
  • 1. Software Releases and Long-Term Support (LTS)▶
    • 1.1. The Software Release Schedule
    • 1.2. Staying Current
  • 2. The Software Upgrade Process▶
    • 2.1. Preparing for the Upgrade
    • 2.2. Upgrading Volt Databases on Managed Servers
      • 2.2.1. Upgrading the VoltDB Software
      • 2.2.2. Upgrading VoltDB Using Save and Restore
      • 2.2.3. Performing an In-Service Upgrade of a Single Cluster
      • 2.2.4. Performing an Online Upgrade Using Multiple XDCR Clusters
    • 2.3. Upgrading Volt in Kubernetes
      • 2.3.1. Updating Your Helm Repository
      • 2.3.2. Updating the Custom Resource Definition (CRD)
      • 2.3.3. Upgrading the VoltDB Operator and Software
      • 2.3.4. Using In-Service Upgrade to Update the VoltDB Software
      • 2.3.5. Updating VoltDB for XDCR Clusters
  • 3. Upgrading to Volt Active Data V8▶
    • 3.1. What's New in Volt V8.0
    • 3.2. Special Considerations for Existing Customers
  • 4. Upgrading to Volt Active Data V9▶
    • 4.1. What's New in Volt V9.0
    • 4.2. Special Considerations for Existing Customers
  • 5. Upgrading to Volt Active Data V10▶
    • 5.1. What's New in Volt V10.0
    • 5.2. Special Considerations for Existing Customers
  • 6. Upgrading to Volt Active Data V11▶
    • 6.1. What's New in Volt V11.0
    • 6.2. Special Considerations for Existing Customers
  • 7. Upgrading to Volt Active Data V12▶
    • 7.1. What's New in Volt V12.0
    • 7.2. Special Considerations for Existing Customers
  • 8. Upgrading to Volt Active Data V13▶
    • 8.1. What's New in Volt V13
    • 8.2. Special Considerations for Existing Customers
  • 9. Upgrading to Volt Active Data V14▶
    • 9.1. What's New in Volt Active Data V14
    • 9.2. Special Considerations for Existing Customers
  • 10. Upgrading to Volt Active Data V15▶
    • 10.1. What's New in Volt Active Data V15
    • 10.2. Special Considerations for Existing Customers
  • A. Configuration File (deployment.xml)▶
    • A.1. Understanding XML Syntax
    • A.2. The Structure of the XML Configuration File
  • B. Using the Original VoltDB Client Interface▶
    • B.1. Connecting to the VoltDB Database
      • B.1.1. Connecting to Multiple Servers
      • B.1.2. Using the Auto-Connecting Client
    • B.2. Invoking Stored Procedures
    • B.3. Invoking Stored Procedures Asynchronously
    • B.4. Closing the Connection
    • B.5. Handling Errors
      • B.5.1. Interpreting Execution Errors
      • B.5.2. Handling Timeouts
      • B.5.3. Writing a Status Listener to Interpret Other Errors

B.2. Invoking Stored Procedures

After your client creates the connection to the database, it is ready to call the stored procedures. You invoke a stored procedure using the callProcedure() method, passing the procedure name and variables as arguments. For example:

VoltTable[] results;
 
try { results = client.callProcedure("LookupFlight",              1
                                     origin,
                                     dest,
                                     departtime).getResults();    2
} catch (Exception e) {                                           3
     e.printStackTrace();
     System.exit(-1);
}

1

The callProcedure() method takes the procedure name and the procedure's variables as arguments. The LookupFlight() stored procedure requires three variables: the originating airport, the destination, and the departure time.

2

Once a synchronous call completes, you can evaluate the results of the stored procedure. The callProcedure() method returns a ClientResponse object, which includes information about the success or failure of the stored procedure. To retrieve the actual return values you use the getResults() method.

3

Note that since callProcedure() can throw an exception (such as VoltAbortException) it is a good practice to perform error handling and catch known exceptions.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.