Skip Headers
Oracle® Database Lite Developer's Guide
10g (10.2.0)
Part No. B15920-01
  Go To Index
Index

Next
Next
 

Contents

Title and Copyright Information

Send Us Your Comments

Preface

Intended Audience
Documentation Accessibility
Structure

1 Overview

1.1 Introduction
1.2 Determining Application Development Environment
1.2.1 Native Applications
1.2.2 Standalone Java Applications
1.2.3 Web Applications
1.3 Oracle Database Lite Application Model and Architecture
1.3.1 Oracle Database Lite RDBMS
1.3.2 Mobile Sync
1.3.3 Mobile Server
1.3.4 Message Generator and Processor (MGP)
1.3.5 Mobile Server Repository
1.4 Execution Models for Oracle Lite Database
1.4.1 Embedded Application in Single Process
1.4.2 Multiple Processes Accessing the Same Database
1.4.3 Multiple Embedded Application Clients Accessing Remote Database
1.4.4 Mobile Client in Single Process
1.4.5 Multiple Clients Accessing Remote Database
1.5 Mobile Development Kit (MDK)
1.5.1 Mobile SQL (mSQL)
1.5.2 Using the Mobile Development Workbench
1.5.3 Using the Packaging Wizard
1.6 Supported Platforms
1.7 Java Support
1.8 Data Source Name

Part I Developing Applications for Oracle Database Lite

2 The Oracle Database Lite RDBMS

2.1 Oracle Lite Database Overview
2.2 Creating and Managing the Database for a Mobile Client
2.3 Creating and Managing the Database in an Embedded Application
2.3.1 Install Oracle Database Lite Runtime
2.3.2 Creating the Default Starter Oracle Lite Database for an Embedded Application
2.3.3 Creating a Unique Oracle Lite Database for an Embedded Application
2.3.3.1 Creating a Data Source Name with ODBC Administrator
2.3.3.2 Creating a New Oracle Lite Database for the Embedded Application
2.3.3.3 Connecting to Your New Oracle Lite Database
2.3.4 Creating Users for Your Embedded Oracle Lite Database
2.3.4.1 Pre-Defined Roles
2.3.4.2 Building and Populating Demo Tables
2.3.5 Packaging Your Embedded Application With the Oracle Database Lite Runtime
2.4 Data Access APIs
2.4.1 JDBC
2.4.2 ODBC
2.4.3 ADO.NET
2.4.4 SODA
2.5 Oracle Database Lite Multi-User Service
2.5.1 Accessing the Multi-User Oracle Database Lite Database Service
2.5.1.1 Installation and Configuration
2.5.1.2 Starting the Multi-User Service
2.5.1.3 Stopping the Multi-User Service
2.5.1.4 Querying the Multi-User Service
2.5.1.5 Debugging the Multi-User Service
2.5.1.6 Creating DSNs
2.5.1.7 Accessing the Database
2.5.1.8 Verifying the Connection Using mSQL
2.6 Move Your Client Data Between an Oracle Lite Database and an External File
2.6.1 Move Data Between an Oracle Lite Database and an External File Using Programmatic APIs
2.6.2 Oracle Database Lite Load Utility (OLLOAD)
2.7 Backing Up an Oracle Lite Database
2.8 Encrypting a Database
2.9 Discover Oracle Lite Database Version Number
2.10 Migrate your Oracle Lite Database
2.11 Support for Linguistic Sort
2.11.1 Creating Linguistic Sort Enabled Databases
2.11.2 How Collation Works
2.11.3 Collation Element Examples
2.11.3.1 Sorting Normal Characters
2.11.3.2 Reverse Sorting of French Accents
2.11.3.3 Sorting Contracting Characters
2.11.3.4 Sorting Expanding Characters
2.11.3.5 Sorting Numeric Characters
2.12 Using Oracle Database Lite Samples
2.12.1 Executing the BLOB Manager Example
2.12.2 Executing the Visual Basic Sample Application
2.12.2.1 Open Visual Basic
2.12.2.2 View the Sample Application Tables and Data
2.12.2.3 Open the Sample Application
2.12.2.4 View and Manipulate the Data in the EMP Table
2.12.3 Executing the ODBC Examples
2.12.3.1 ODBCTBL
2.12.3.2 ODBCVIEW
2.12.3.3 ODBCFUNC
2.12.3.4 ODBCTYPE
2.12.3.5 LONG
2.13 Limitations of the Oracle Database Lite Engine

3 Synchronization

3.1 How Does Synchronization Work?
3.1.1 How Updates Are Propagated to the Back-End Database
3.2 What is The Process for Setting Up a User For Synchronization?
3.2.1 Creating a Snapshot Definition Declaratively
3.2.1.1 Manage Snapshots
3.2.2 Creating the Snapshot Definition Programmatically
3.3 Creating Publications Using Oracle Database Lite APIs
3.3.1 Defining a Publication With Java Consolidator Manager APIs
3.3.1.1 Create the Mobile Server User
3.3.1.2 Create Publications
3.3.1.3 Create Publication Items
3.3.1.4 Data Subsetting: Defining Client Subscription Parameters for Publications
3.3.1.5 Create Publication Item Indexes
3.3.1.6 Adding Publication Items to Publications
3.3.1.7 Creating Client-Side Sequences for the Downloaded Snapshot
3.3.1.8 Subscribing Users to a Publication
3.3.1.9 Instantiate the Subscription
3.3.1.10 Bringing the Data From the Subscription Down to the Client
3.3.1.11 Modifying a Publication Item
3.3.1.12 Callback Customization for DML Operations
3.3.1.13 Restricting Predicate
3.4 Client Device Database DDL Operations
3.5 Customize the Apply and Compose Phases Using the Consolidator Manager APIs
3.5.1 Compose Phase Customization Using MyCompose
3.5.1.1 Create a Class That Extends MyCompose to Perform the Compose
3.5.1.2 Implement the Extended MyCompose Methods in the User-Defined Class
3.5.1.3 Use Get Methods to Retrieve Information You Need in the User-Defined Compose Class
3.5.1.4 Register the User-Defined Class With the Publication Item
3.6 Customize What Occurs Before and After Synchronization Phases
3.6.1 Customize What Occurs Before and After Every Phase of Each Synchronization
3.6.1.1 NullSync
3.6.1.2 BeforeProcessApply
3.6.1.3 AfterProcessApply
3.6.1.4 BeforeProcessCompose
3.6.1.5 AfterProcessCompose
3.6.1.6 BeforeProcessLogs
3.6.1.7 AfterProcessLogs
3.6.1.8 BeforeClientCompose
3.6.1.9 AfterClientCompose
3.6.1.10 Example Using the Customize Package
3.6.2 Customize What Occurs Before and After Compose/Apply Phases for a Single Publication Item
3.7 Client Synchronization
3.7.1 Performing Synchronization Upload and Download Phases for the Client Using Mobile Sync APIs
3.7.1.1 Starting Synchronization Upload and Download Phases With the COM Interface
3.7.1.2 Starting Synchronization Upload and Download Phases With C or C++ Applications
3.7.1.3 Starting Synchronization Upload and Download Phases With Java Applications
3.7.1.4 Starting Synchronization Upload and Download Phases With the ADO.NET Provider
3.7.2 Using Mobile Sync for Palm
3.8 Understanding Your Refresh Options
3.8.1 Fast Refresh
3.8.2 Complete Refresh for Views
3.8.3 Queue-Based Refresh
3.9 Synchronizing With Database Constraints
3.9.1 Synchronization And Database Constraints
3.9.2 Primary Key is Unique
3.9.3 Foreign Key Constraints
3.9.3.1 Set Update Order for Tables With Weights
3.9.3.2 Defer Constraint Checking Until After All Transactions Are Applied
3.9.4 Unique Key Constraint
3.9.5 Not Null Constraint
3.10 Parent Tables Needed for Updateable Views
3.10.1 Creating a Parent Hint
3.10.2 INSTEAD OF Triggers
3.11 Manipulating Application Tables
3.11.1 Creating Secondary Indexes on Client Device
3.11.2 Virtual Primary Key
3.12 Set DBA or Operational Privileges for the Mobile Server
3.13 Create a Synonym for Remote Database Link Support For a Publication Item
3.13.1 Publishing Synonyms for the Remote Object Using CreatePublicationItem
3.13.2 Creating or Removing a Dependency Hint
3.14 Using the Sync Discovery API to Retrieve Statistics
3.14.1 getDownloadInfo Method
3.14.2 DownloadInfo Class Access Methods
3.14.3 PublicationSize Class
3.15 Customizing Replication With Your Own Queues
3.15.1 Queue Interface Operation
3.15.2 Queue Creation
3.15.3 Queue Interface PL/SQL Procedure
3.15.4 Create a Publication Item as a Queue
3.15.5 Defining a PL/SQL Package Outside the Repository
3.16 Synchronization Performance
3.17 Troubleshooting Synchronization Errors
3.17.1 Foreign Key Constraints in Updatable Publication Items
3.17.1.1 Foreign Key Constraint Violation Example
3.17.1.2 Avoiding Constraint Violations with Table Weights
3.17.1.3 Avoiding Constraint Violations with BeforeApply and After Apply
3.18 Datatype Conversion Between the Oracle Server and Client Oracle Lite Database

4 Invoking Synchronization APIs from Applications

4.1 Synchronization API For the COM Interface
4.1.1 COM Interface ISyncOption Interface
4.1.2 COM Interface SyncParam Settings
4.1.3 COM Interface TransportParam Parameters
4.1.4 Selective Synchronization
4.1.5 ISyncProgressListener Interface
4.1.6 Initiate Synchronization with the ISync Interface
4.2 Synchronization APIs For C or C++ Applications
4.2.1 Initializing the Environment With ocSessionInit
4.2.2 Managing the C/C++ Data Structures
4.2.2.1 ocEnv Data Structure
4.2.2.2 ocTransportEnv Data Structure
4.2.3 Retrieving Publication Information With ocGetPublication
4.2.4 Managing User Settings With ocSaveUserInfo
4.2.5 Manage What Tables Are Synchronized With ocSetTableSyncFlag
4.2.6 Start the Synchronization With the ocDoSynchronize Method
4.2.7 Clear the Synchronization Environment Using ocSessionTerm
4.3 Synchronization API for Java Applications
4.3.1 Overview
4.3.2 Sync Class
4.3.3 SyncException Class
4.3.4 SyncOption Class
4.3.5 Java Interface SyncParam Settings
4.3.6 Java Interface TransportParam Parameters
4.3.7 SyncProgress Listener Service
4.4 msync/OCAPIs/mSyncCom

5 Using Mobile Database Workbench to Create Publications

5.1 Create a Project
5.2 Create a Publication Item
5.2.1 Create SQL Statement for Publication Item
5.2.2 Create a Dependency Hint
5.2.3 Specify Parent Table and Primary Key Hints
5.3 Create a Sequence
5.4 Test and Load a Script Into The Project
5.4.1 Test SQL Scripts
5.4.1.1 Connect to the Database
5.4.1.2 Load and Execute SQL Scripts
5.4.2 Load the Script Into the Project
5.5 Load a Resource Into the Project
5.6 Create a Publication
5.6.1 Associate Publication Item With Publication
5.6.1.1 Associating a Publication Item to this Publication
5.6.2 Associate a Sequence With the Publication
5.6.3 Associate a Script With the Publication
5.6.4 Associate a Resource With the Publication
5.7 Import Existing Publications and Objects from Repository
5.7.1 Import Existing Publication from Repository
5.7.2 Import Existing Publication Item From the Repository
5.7.3 Import Existing Sequence From the Repository
5.7.4 Import Existing Resource From the Repository
5.7.5 Import an Existing Script From the Repository
5.8 Create a Virtual Primary Key
5.9 Test a Publication by Performing a Synchronization
5.10 Deploy the Publications in the Project to the Repository

6 Using the Packaging Wizard

6.1 Using the Packaging Wizard
6.1.1 Starting the Packaging Wizard
6.1.2 Specifying New Application Definition Details
6.1.3 Listing Application Files
6.1.3.1 Compile JSP (For Web Applications Only)
6.1.3.2 Filters
6.1.4 Adding Servlets (For Web Applications Only)
6.1.5 Entering Database Information
6.1.6 Defining Application Roles
6.1.7 Defining Snapshots for Replication
6.1.7.1 Creating New Snapshots
6.1.7.2 Creating Indexes for Snapshots
6.1.7.3 Importing Snapshots
6.1.7.4 Editing Snapshots
6.1.8 Defining Sequences for Replication
6.1.8.1 Importing Sequences
6.1.9 Defining Application DDLs
6.1.9.1 Importing Views and Index Definitions
6.1.10 Editing Application Definition
6.1.11 Troubleshooting
6.2 Packaging Wizard Synchronization Support

7 Developing Mobile Web Applications

7.1 Setting up the Mobile Client
7.2 Developing and Testing the Application
7.2.1 Building Web-to-Go Applications
7.2.1.1 Static Components
7.2.1.2 Dynamic Components
7.2.1.3 Database Components
7.2.1.4 Database Connections
7.2.2 Application Roles
7.2.3 Developing JavaServer Pages
7.2.3.1 Mobile Server or Mobile Development Kit Web Server
7.2.3.2 Mobile Client for Web-to-Go
7.2.4 Developing Java Servlets for Web-to-Go
7.2.4.1 Limitations
7.2.4.2 Accessing Applications on the Mobile Development Kit for Web-to-Go
7.2.4.3 Creating a Servlet
7.2.4.4 Running a Servlet
7.2.4.5 Debugging a Servlet
7.2.4.6 Accessing the Schema Directly in Oracle Database Lite
7.2.5 Using Web-to-Go Applets
7.2.5.1 Creating the Web-to-Go Applet
7.2.5.2 Creating the HTML Page for the Applet
7.2.6 Developing Applet JDBC Communication
7.2.6.1 getConnection()
7.2.6.2 Design Issue
7.2.7 Developing Applet Servlet Communication
7.2.7.1 Creating the Web-to-Go Servlet
7.2.8 Debugging Web-to-Go Applications
7.2.8.1 Running Sample 1 Using Oracle9i JDeveloper
7.2.9 Customizing the Workspace Application
7.2.9.1 Web-to-Go Parameters
7.2.9.2 Sample Workspace
7.2.10 Using the Mobile Server Admin API

8 Native Application Development

8.1 Supported Platforms for Native Applications
8.2 Supported APIs for Oracle Database Lite
8.3 Data Source Name

9 Java Application Development

9.1 Java Support for Applications
9.1.1 JDBC Drivers
9.2 Oracle Database Lite Java Development Environment
9.2.1 Setting Variables for JDK 1.4.2
9.3 Java Development Tools

10 JDBC Programming

10.1 JDBC Compliance
10.2 JDBC Environment Setup
10.3 JDBC Drivers to Use When Connecting to Oracle Database Lite
10.3.1 Type 2 Driver
10.3.2 Type4 (Pure Java) Driver Connection URL Syntax
10.4 DataSource Connection
10.5 Java Datatypes and JDBC Extensions
10.5.1 Java Datatypes
10.5.2 Datatype Extensions
10.5.3 Data Access Extensions
10.5.3.1 Reading from a BLOB Sample Program
10.5.3.2 Writing to a CLOB Sample Program
10.6 Limitations
10.7 New JDBC 2.0 Features
10.7.1 Interface Connection
10.7.1.1 Methods
10.7.2 Interface Statement
10.7.3 Interface ResultSet
10.7.3.1 Fields
10.7.3.2 Methods
10.7.3.3 Methods that Return False
10.7.4 Interface Database MetaData
10.7.4.1 Methods
10.7.4.2 Methods that Return False
10.7.5 Interface ResultMetaData
10.7.5.1 Methods
10.7.6 Interface PreparedStatement
10.7.6.1 Methods

11 Java Stored Procedures and Triggers

11.1 Java Stored Procedure Features in Oracle Database Lite
11.2 Stored Procedures and Triggers Overview
11.3 Using Stored Procedures
11.3.1 Model 1: Using the Load and Publish Stored Procedure Development Model
11.3.1.1 Loading Classes
11.3.1.2 Publishing Stored Procedures to SQL
11.3.1.3 Calling Published Stored Procedures
11.3.1.4 Dropping Published Stored Procedures
11.3.1.5 Example
11.3.2 Model 2: Using the Attached Stored Procedure Development Model
11.3.2.1 Attaching a Java Class to a Table
11.3.2.2 Table-Level Stored Procedures
11.3.2.3 Row-Level Stored Procedures
11.3.2.4 Calling Attached Stored Procedures
11.3.2.5 Dropping Attached Stored Procedures
11.3.2.6 Example
11.3.3 Calling Java Stored Procedures from ODBC
11.4 Java Datatypes
11.4.1 Declaring Parameters
11.4.2 Using Stored Procedures to Return Multiple Rows
11.4.2.1 Returning Multiple Rows in ODBC
11.4.2.2 Example
11.5 Using Triggers
11.5.1 Statement-Level vs. Row-Level Triggers
11.5.2 Creating Triggers
11.5.2.1 Enabling and Disabling Triggers
11.5.3 Dropping Triggers
11.5.4 Trigger Example
11.5.5 Trigger Arguments
11.5.6 Trigger Arguments Example
11.6 Creating a Stored Procedure and Trigger
11.6.1 Start mSQL
11.6.2 Create a Table
11.6.3 Create a Java Class
11.6.4 Load the Java Class File
11.6.5 Publish the Stored Procedure
11.6.6 Populate the Database
11.6.7 Execute the Procedure
11.6.8 Verify the Email Address
11.7 Create a Trigger
11.7.1 Testing the Trigger
11.7.2 Verify the Email Address
11.8 Commit or Roll Back
11.9 Executing Java Stored Procedures from JDBC
11.9.1 Using the executeQuery Method
11.9.2 Using a Callable Statement

12 Using Simple Object Data Access (SODA) for PalmOS and PocketPC Platforms

12.1 Getting Started With SODA
12.1.1 Overview of the SODA Classes
12.1.2 Demonstrating Frequently-Used SODA Classes
12.2 Using SQL Queries in SODA Code for PocketPC Platforms
12.3 Virtual Columns and Object-Relational Mapping
12.4 Behavior of Reference-Counted and Copy-By-Assignment Objects
12.5 Another Library for Exceptions (ALE)
12.5.1 Decorating Classes With ALE
12.5.2 New Operator and ALE
12.5.3 Global Variables
12.5.4 Exceptions and Inheritance
12.5.5 Using ALE with PocketPC ARM Compilers
12.5.6 Troubleshooting ALE Runtime Errors
12.5.7 Compiling Your Program With ALE
12.5.8 ALE Code on Systems That Support Exceptions
12.6 Building a SODA Forms Application
12.6.1 Development Environment Requirements
12.6.2 Develop Your GUI Using the SODA Forms Library
12.6.2.1 Traditional Way to Develop Native Data Entry Applications
12.6.2.2 Trimming Your PalmOS and PocketPC UI Code With SODA Forms
12.6.3 Designing the UI for PocketPC
12.6.4 Customizing the Database Schema
12.6.5 Binding UI to Data
12.6.5.1 Binding UI to Data for the PalmOS Environment
12.6.5.2 Binding UI to Data for the PocketPC Environment
12.6.6 Setting List Choices for Status Contol on PocketPC
12.6.7 Customizing the Table in OrderForm
12.6.8 Monitoring the Logic
12.6.9 Compiling Your SODA Application
12.7 SODA Forms Edit Modes
12.7.1 Editing a Single Object
12.7.2 Editing a List of Objects
12.7.3 Creating a New Object
12.7.4 Popping Up A Dialog
12.7.5 Custom Queries for PocketPC Environment
12.8 Customizing Your SODA Forms Application
12.8.1 Customizing Help Messages
12.8.2 Menus
12.8.3 Default Button
12.8.4 Toolbar Icons
12.9 Displaying a List Of Objects in a Table
12.10 SODA Forms UI Controls
12.11 OKAPI API

13 Developing Mobile Applications for PalmOS Devices

13.1 Installing Oracle Database Lite Runtime on the Device
13.2 Uninstalling or Replacing Oracle Database Lite Runtime
13.3 Running Oracle Database Lite on Palm OS Emulator
13.4 Running Oracle Database Lite on Palm OS Simulator
13.5 Using Oracle Database Lite Base Libraries
13.6 Building a SODA Application
13.7 Building a SODA Forms Application
13.8 Building an ODBC Application
13.9 Packaging your Application with Oracle Database Lite Runtime
13.10 Customizing Oracle Database Lite Runtime
13.11 Using Mobile Sync for Palm
13.11.1 Configuring msync
13.11.2 Using HotSync to Synchronize Data with the Mobile Server
13.11.2.1 Configuring HotSync for a PalmOS Device
13.11.2.2 HotSync Timeout Errors
13.11.2.3 Configuring PalmOS Emulator for HotSync
13.11.3 Using Network Sync
13.11.3.1 Synchronizing Using a Cradle and Windows Desktop
13.11.3.2 Network Sync With PalmOS Emulator
13.12 Palm Shared Library Manager (PSLM)
13.12.1 Overview
13.12.2 Trying out PSLM
13.12.3 Writing a PSLM Library
13.12.4 Building a Shared Library Project
13.12.5 Calling a PSLM Library from Your Application
13.12.6 Building an Application Using PSLM
13.12.7 Exceptions Across Modules
13.12.8 Cloaked Shared Libraries
13.12.9 Patching the CodeWarrior Runtime

14 Oracle Database Lite ADO.NET Provider

14.1 Discussion of the Classes That Support the ADO.NET Provider
14.1.1 Establish Connections With the OracleConnection Class
14.1.2 Transaction Management
14.1.3 Create Commands With the OracleCommand Class
14.1.4 Maximize Performance Using Prepared Statements With the OracleParameter Class
14.1.4.1 SQL String Parameter Syntax
14.1.5 Large Object Support With the OracleBlob Class
14.1.5.1 Using BLOB Objects in Parameterized SQL Statements
14.1.5.2 Query Tables With BLOB Columns
14.1.5.3 Read and Write Data to BLOB Objects
14.1.6 Data Synchronization With the OracleSync Class
14.1.6.1 Using the OracleSync Class to Synchronize
14.1.6.2 Using the OracleEngine to Synchronize
14.1.7 Creating a Database for Testing
14.2 Running the Demo for the ADO.NET Provider
14.3 Limitations for the ADO.NET Provider
14.3.1 Partial Data Returned with GetSchemaTable
14.3.2 Creating Multiple DataReader Objects Can Invalidate Each Other
14.3.3 Calling DataReader.GetString Twice Results in a DbNull Object
14.3.4 Thread Safety

15 Oracle Database Lite Transaction Support

15.1 Locking
15.2 What Are the Transaction Isolation Levels?
15.3 Configuring the Isolation Level
15.4 Supported Combinations of Isolation Levels and Cursor Types

16 Oracle Database Lite Development Performance Considerations

16.1 Increasing Synchronization Performance
16.1.1 Synchronization Disk Needs May Impose on WinCE Platform Available Space
16.1.2 Shared Maps
16.1.2.1 Concepts
16.1.2.2 Performance Attributes
16.1.2.3 Usage
16.1.2.4 Compatibility and Migration
16.1.3 Priority-Based Replication
16.1.4 Caching Publication Item Queries
16.1.4.1 Enabling Publication Item Query Caching
16.1.4.2 Disabling Publication Item Query Caching
16.1.5 Use Map Table Partitions to Streamline Users Who Subscribe to a Large Amount of Data
16.1.5.1 Create a Map Table Partition
16.1.5.2 Add Map Table Partitions
16.1.5.3 Drop a Map Table Partition
16.1.5.4 Drop All Map Table Partitions
16.1.5.5 Merge Map Table Partitions
16.2 Determine Execution of SQL Query With EXPLAIN PLAN
16.3 Synchronization Performance Tuning for the Mobile Server
16.3.1 Tuning Queries to Manage Synchronization Performance
16.3.1.1 Avoid Using Non-Mergable Views
16.3.1.2 Tune Queries With Consperf Utility
16.3.1.3 Manage the Query Optimizer
16.3.2 Architecture Design of Mobile Server and Oracle Database for Synchronization Performance
16.3.3 Configuring Back-End Oracle Database to Enhance Synchronization Performance
16.3.3.1 Tablespace Layout
16.3.3.2 Database Parameter Tuning
16.3.4 Configure Your Mobile Server to Increase Synchronization Performance
16.3.5 Designing Application Tables and Indexes for Synchronization Performance

17 Oracle Database Lite Security

17.1 Authenticating Users With Your Own User Management System
17.1.1 Implementing Your External Authenticator
17.1.2 Registering External Authenticator
17.1.3 User Initialization Scripts
17.2 Providing Your Own Encryption Module for the Client Oracle Lite Database
17.2.1 Encryption Module APIs
17.2.1.1 Initializing the Encryption Module
17.2.1.2 Delete Encryption Context
17.2.1.3 Create the Encryption Key
17.2.1.4 Encrypt Data
17.2.1.5 Decrypt Data
17.2.2 Plug-In Custom Encryption Module

18 Oracle Database Lite Tracing

18.1 Enabling Trace Output
18.2 Description of Trace Information
18.2.1 Table Name Output

Part II Development Tutorials

19 Building Mobile Web Applications: A Tutorial

19.1 Overview
19.1.1 Before You Start
19.1.1.1 Development Computer Requirements
19.1.1.2 Client Computer Requirements
19.2 Developing the Application
19.2.1 Step 1: Creating Database Objects in Oracle Database Lite
19.2.1.1 The To Do List Application Database Objects
19.2.1.2 Required Action
19.2.2 Step 2: Compiling the Application
19.2.2.1 Required Action
19.2.3 Step 3: Defining the Application and Registering the Servlet
19.2.3.1 The Packaging Wizard
19.2.3.2 Required Action
19.2.4 Step 4: Conducting a Trial Run
19.2.4.1 The Mobile Development Kit for Web-to-Go Web Server
19.2.4.2 Required Action
19.3 Packaging the Application
19.3.1 Step 1: Defining the Application
19.3.1.1 The Packaging Wizard
19.3.1.2 Required Action
19.3.2 Step 2: Specifying Database Details
19.3.2.1 Required Action
19.3.3 Step 3: Defining the Snapshot
19.3.3.1 The Snapshots Tab
19.3.3.2 Required Action
19.3.4 Step 4: Defining Sequences
19.3.5 Step 5: Creating SQL Files for the Application
19.3.5.1 Required Action
19.3.6 Step 6: Package the Application
19.3.6.1 Required Action
19.4 Publishing the Application
19.4.1 Step1: Create the Table Owner Account
19.4.2 Step 2: Create the Database Objects in the Oracle Database
19.4.2.1 Required Action
19.4.3 Step 3: Start the Mobile Server
19.4.3.1 Required Action
19.4.4 Step 4: Log on to the Mobile Server and Start the Mobile Manager
19.4.4.1 Required Action
19.4.5 Step 5: Upload the Application
19.4.5.1 Required Action
19.5 Administering the Application
19.5.1 Step 1: Starting the Mobile Manager
19.5.1.1 Required Action
19.5.2 Step 2: Using the Mobile Manager to Create a New User
19.5.2.1 Required Action
19.5.3 Step 3: Setting Application Properties
19.5.3.1 Required Action
19.5.4 Step 4: Granting User Access to the Application
19.5.4.1 Required Action
19.5.5 Step 5: Defining Snapshot Template Values for the User
19.5.5.1 Required Action
19.6 Running the Application on the Mobile Client for Web-to-Go
19.6.1 Step 1: Installing the Mobile Client for Web-to-Go
19.6.1.1 Required Action
19.6.2 Step 2: Logging into the Mobile Client for Web-to-Go
19.6.2.1 Required Action
19.6.3 Step 3: Synchronizing the Mobile Client for Web-to-Go
19.6.3.1 Required Action

20 Building Offline Mobile Web Applications Using BC4J: A Tutorial

20.1 Overview
20.1.1 Before You Start
20.2 Developing the Application
20.2.1 Creating the Database Connection
20.2.1.1 Create the Connection to the Back-End Oracle Database
20.2.1.2 Create the Connection to the Oracle Lite Database
20.2.2 Creating the BC4J Component
20.2.3 Configuring the BC4J Component to Use the WTGJdbc Connection
20.2.4 Building and Deploying the BC4J Component as a Simple Archive
20.2.5 Writing the JSP Application to Access the BC4J Component
20.2.6 Deploying the JSP Application as a Simple Archive
20.3 Packaging the JSP Application
20.4 Publishing and Configuring the JSP Application from the Mobile Manager
20.5 Testing the BC4J Application
20.6 Running the BC4J Application on the Mobile Client for Web-to-Go
20.7 Deploying the Sample Application

21 Building Offline Mobile Applications for Win32: A Tutorial

21.1 Overview
21.2 Developing Offline Mobile Applications for Win32
21.2.1 Command Sequence
21.2.1.1 Step 1. Create TASK Table on the Server Database
21.2.1.2 Step 2. Define a Publication Item and Publish the Application
21.2.1.3 Step 3. Create Users and Subscriptions
21.2.1.4 Step 4. Install the Oracle Database Lite 10g Client and the Mobile Field Service Application and Data
21.2.1.5 Step 5. Browse the TASK Snapshot and Update a Row
21.2.1.6 Step 6. Synchronize the Change with the Server
21.2.1.7 Step 7. Check your changes on the server and modify a server record
21.2.1.8 Step 8. Synchronize again to get the server changes
21.2.1.9 Step 9. Develop your Mobile Field Service Application Using Oracle Database Lite
21.2.1.10 Step 10. Republish the Application with the Application Program

22 Building Offline Mobile Applications for Windows CE: A Tutorial

22.1 Overview
22.1.1 Before You Start
22.1.1.1 Application Development Computer Requirements
22.1.1.2 Client Device Requirements
22.2 Developing the Application
22.2.1 Creating Database Objects in the Oracle Server
22.2.1.1 The Pocket PC Transport Application Database Objects
22.2.2 Writing the Application Code
22.2.2.1 Transport Module (Transport.vb)
22.2.2.2 Main Form (frmMain.vb)
22.2.2.3 View Packages (frmView.vb)
22.2.2.4 Create Package (frmNew.vb)
22.2.3 Compiling the Application
22.2.3.1 Creating CAB Files
22.2.3.2 Installing the Application from the CAB File
22.3 Packaging and Publishing the Application
22.3.1 Defining the Application Using the Packaging Wizard
22.3.1.1 Creating a New Application
22.3.2 Defining the Application Connection to the Oracle Database Server
22.3.3 Defining Snapshots
22.3.4 Publishing the Application
22.4 Administering the Application
22.4.1 Starting the Mobile Server
22.4.2 Launching the Mobile Manager
22.4.3 Creating a New User
22.4.4 Setting the Application Properties
22.4.5 Granting User Access to the Application
22.4.6 Starting the Message Generator and Processor (MGP)
22.5 Running the Application on the Pocket PC
22.5.1 Installing the Oracle Database Lite Mobile Client for Pocket PC
22.5.2 Installing and Synchronizing the Transport Application and Data

Part III Appendices

A Optimizing SQL Queries

A.1 Optimizing Single-Table Queries
A.2 Optimizing Join Queries
A.2.1 Create an Index on the Join Column(s) of the Inner Table
A.2.2 Bypassing the Query Optimizer
A.3 Optimizing with Order By and Group By Clauses
A.3.1 IN Subquery Conversion
A.3.2 ORDER BY Optimization with No GROUP BY
A.3.3 GROUP BY Optimization with No ORDER BY
A.3.4 ORDER BY Optimization with GROUP BY
A.3.5 Cache Subquery Results

B Oracle Lite Database Utilities

B.1 The mSQL Tool
B.1.1 The mSQL Tool for Windows 32
B.1.1.1 Starting mSQL
B.1.1.2 Populating your Database Using mSQL
B.1.1.3 SET TERM {ON|OFF}
B.1.1.4 SET TIMING {ON|OFF}
B.1.1.5 SET VERIFY {ON|OFF}
B.1.2 The mSQL Tool for Windows CE
B.1.2.1 Database Access
B.1.2.2 Starting mSQL
B.1.2.3 Manage Snapshots Using mSQL
B.2 CREATEDB
B.3 REMOVEDB
B.4 ENCRYPDB
B.5 DECRYPDB
B.6 MIGRATE
B.7 ODBC Administrator and the Oracle Database Lite ODBC Driver
B.7.1 Adding a DSN Using the ODBC Administrator
B.7.2 Adding a DSN which points to Read-Only Media (CD-ROM)
B.8 ODBINFO
B.9 VALIDATEDB
B.9.1 Using the VALIDATEDB Utility for the Palm Platform
B.9.1.1 Overview
B.9.1.2 Installing VALIDATEDB
B.9.1.3 Running VALIDATEDB
B.9.1.4 Sending Corrupted Databases
B.9.1.5 Sending Companion Databases
B.10 Transferring Data Between a Database and an External File
B.10.1 OLLOAD
B.10.1.1 Syntax
B.10.1.2 Keywords and Parameters
B.10.2 Oracle Database Lite Load Application Programming Interfaces (APIs)
B.10.2.1 Overview
B.10.2.2 Oracle Database Lite Load APIs
B.10.2.3 File Format
B.10.2.4 Limitations

C ODBC Support on Palm

C.1 ODBC Support
C.1.1 SQLAllocConnect
C.1.2 SQLAllocEnv
C.1.3 SQLAllocHandle
C.1.4 SQLAllocStmt
C.1.5 SQLFreeConnect
C.1.6 SQLFreeEnv
C.1.7 SQLFreeHandle
C.1.8 SQLFreeStmt
C.1.9 SQLConnect
C.1.10 SQLDisconnect
C.1.11 SQLBindParameter
C.1.12 SQLPrepare
C.1.13 SQLExecDirect
C.1.14 SQLExecute
C.1.15 SQLFetch
C.1.16 SQLBindCol
C.1.17 SQLDescribeCol
C.1.18 SQLError
C.1.19 SQLGetData
C.1.20 SQLNumResultCols
C.1.21 SQLRowCount
C.1.22 SQLTransact

Glossary

Index