# Database Control

A Database control makes it easy to access a relational database from your application. Using the Database control, you can issue SQL commands to the database. The Database control automatically performs the translation from database queries to Java objects, so that you can easily access query results.

A Database control can operate on any database for which an appropriate Java Database Connectivity (JDBC) driver is available and for which a data source is configured in WebLogic Server. When you add a new Database control to your application, you specify a data source for that control. The data source indicates which database the control is bound to.

## Topics Included in this Section

Overview: Database Controls

Introduces the basic concepts behind Database controls.

Creating a New Database Control

Explains how to create a new Database control.

Adding a Method to a Database Control

Describes how to write methods on a Database control.

Returning a Single Value from a Database Control Method

Explains how to return a single value from a Database control method and provides examples of the operation.

Returning a Single Row from a Database Control Method

Explains how to return a class of values from a Database control method.

Returning Multiple Rows from a Database Control Method

Describes the options for returning a set of values from a Database control method.

Modifying Data with a Database Control

Describes the options for returning a set of values from a Database control method.

Returning XMLBeans from a Database Control

Describes how to return XMLBean types from a Database Control.

Parameter Substitution in @jc:sql Statements

Lists the criteria for substitution and describes the process of substituting parameters.

Automatically Generating Primary Key Values and Database Controls

Explains how to use Oracle's and SQL Server's auto-generation of primary keys in conjunction with a Database control.

Stored Functions

Explains how to call and create stored functions with a Database control.

Stored Procedures

Explains how to call and create stored procedures with a Database control.

Limiting the Size of Returned Data

Explains how to set the maximum number of records returned by a query.

Declaring Exceptions in Database Control Methods

Provides information to help you decide whether or not to declare exceptions in Database control methods.

Designing a Database Control

Provides some guidelines for designing your database control.

RowSet Control

Describes a special type of Database control used to provide CRUD operations on a database table or view.

RowSet Controls and SQL Join Queries

Describes how to edit a RowSet control to incorporate SQL join queries.

Mapping Database Field Types to Java Types in a Database Control

Provides tables showing how to map field types to Java types.

Configuring a Data Source

Configure a data source with the Data Source Viewer.

##

## Database Control Samples

CustomerDBClient.jws Sample

LuckyNumberDBClient.jws Sample

Related Topics

Using WebLogic Built-In Controls

Applications and Projects

JCX File: Extending Controls the topic titles linked to and from are different

How Do I: Create a RowSet Control to Access a Database?