All Examples  This Package

Class examples.jdbc.mssqlserver4.storedprocs

java.lang.Object
   |
   +----examples.jdbc.mssqlserver4.storedprocs

public class storedprocs
extends Object
This simple example shows how to create and execute stored procedures, and get the results.

This example is run on the command line and is output to System.out.

Please note that this example uses a simple method for obtaining result sets, update counts, and/or the output parameter values it may generate. This is always possible with simple, known queries. When executing complex or unknown possibly multi-statement SQL or stored procedures, you should use the example in complexproc.java to ensure that all results become available.

To set up this example:

  1. Set up your development shell as described in Package examples.jdbc.mssqlserver4.

  2. Change the database URL, login, and password connection parameters to correspond to your Microsoft SQL Server configuration. If you need more help, check the section on connecting to a database in the Developers Guide, Using WebLogic jDriver for Microsoft SQL Server.

  3. Compile this example by executing the following command in your development shell:

    $ javac -d c:/weblogic/mssqlserver4/classes storedprocs.java

  4. Run this example by executing the following command in your development shell:

    $ java examples.jdbc.mssqlserver4.storedprocs


Constructor Index

 o storedprocs()

Method Index

 o main(String[])

Constructors

 o storedprocs
 public storedprocs()

Methods

 o main
 public static void main(String argv[]) throws Exception

All Examples  This Package