WebLogic Server 7.0 Code Examples, BEA Systems, Inc.

examples.jdbc.mssqlserver4
Class LargeTableTests

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

public class LargeTableTests
extends java.lang.Object

This example creates a large table, retrieves its contents, and then deletes the table.

The application demonstrates how to:

The test creates a stored procedure, so you must use an account that has the required privileges.

Build the Example

  1. Change the database user, password, server, and URL in the build.xml file in %SAMPLES_HOME%\server\src\examples\jdbc\mssqlserver4 to correspond to your Microsoft SQL Server configuration.

    Note: You may need sa privileges in SQL Server to run this example. When you specify a user and password, make sure the user has sa privileges in the database.

    If you need more help, check the section on connecting to a database in the programming guide, Using WebLogic jDriver for Microsoft SQL Server.

  2. Open a new command shell.

  3. Set up this development shell as described in Setting up Your Environment for Building and Running the Examples.

  4. Compile this example using the following command line:
      prompt> ant

    Note: This script builds all of the examples in the mssqlserver4 directory.

Run the Example

  1. Execute the following command in your development shell:
      prompt> ant run

    Note: This script runs all of the examples in the mssqlserver4 directory.

There's More

For more information about the WebLogic jDriver for Microsoft SQL Server, see Using WebLogic jDriver for Microsoft SQL Server.


Field Summary
(package private) static java.lang.String driverName
           
(package private) static int kNumberOfRows
           
 
Constructor Summary
LargeTableTests()
           
 
Method Summary
(package private) static void dumpResults(java.sql.Statement statement)
          Drain result sets and update counts.
static void main(java.lang.String[] argv)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

driverName

static java.lang.String driverName

kNumberOfRows

static int kNumberOfRows
Constructor Detail

LargeTableTests

public LargeTableTests()
Method Detail

dumpResults

static void dumpResults(java.sql.Statement statement)
                 throws java.sql.SQLException
Drain result sets and update counts.
Parameters:
statement, - the Statement object, which has already been executed.
Throws:
java.sql.SQLException -  

main

public static void main(java.lang.String[] argv)

Documentation is available at
http://e-docs.bea.com/wls/docs70

Copyright © 2002 BEA Systems, Inc. All Rights Reserved.