Skip Headers
Oracle9
i
Lite Developers Guide for Palm
Release 5.0.1
Part No. A95911-01
Index
Contents
List of Figures
List of Tables
Title and Copyright Information
Send Us Your Comments
Preface
1 Overview
1.1 Introduction
1.1.1 Oracle Lite DBMS
1.1.2 Mobile Sync
1.1.3 Mobile SQL
1.1.4 Samples
1.1.5 Mobile Server
1.2 Environment
1.3 Development Interface
1.3.1 ODBC
1.3.2 Oracle Lite OKAPI
1.3.3 Mobile Sync API
1.4 Development Process
1.4.1 Configuring the Development System
1.4.2 Creating Snapshot Definitions
1.4.2.1 Creating a Snapshot Definition Declaratively
1.4.2.2 Creating the Snapshot Definition Programmatically
1.4.3 Setting Up the Palm OS Emulator
1.4.4 Replication with the Emulator
1.4.5 Developing Mobile Applications for Palm
1.4.6 Testing on the Device
1.4.7 Application Packaging
2 Configuring the Development System
2.1 General Requirements
2.2 Configuring the Development Environment
2.2.1 Palm Computing Platform Development Environment
2.2.1.1 Installing Oracle Lite on the Development System
2.2.1.2 Directory Structure
2.2.1.3 Static, Shared, and Stub Libraries
2.3 Configuring the Palm Emulator
2.3.1 TCP/IP Configuration
3 Synchronization
3.1 Overview
3.1.1 Publication and Subscription
3.1.2 Client Device Database DDL Operations
3.1.3 Database Support
3.1.4 Binding User-Defined PL/SQL Packages
3.1.5 Special Characters Allowed in Database Base Objects
3.1.6 Fast Refresh and Update Operation for Views
3.1.6.1 Updatable Parent Tables
3.1.6.2 Using Parent Table Hints and INSTEAD OF Triggers
3.1.6.3 Fast Refresh for Views
3.1.6.4 Complete Refresh for Views
3.1.7 Foreign Key Constraints in Updatable Publication Items
3.1.7.1 Foreign Key Constraint Violation Example
3.1.7.2 Avoiding Constraint Violations with BeforeApply and After Apply
3.1.7.3 Avoiding Constraint Violations with Table Weights
3.1.8 Replication Errors and Conflicts
3.1.8.1 Versioning
3.1.8.2 Winning Rules
3.2 Mapping Datatypes Between the Oracle Server and Devices
3.2.1 Oracle Lite Database Datatypes
3.2.2 Satellite Forms Datatypes
3.3 The Publish and Subscribe Model
3.3.1 Implementing the Publish/Subscribe Model
3.3.2 API Reference
3.3.3 Connecting to Mobile Server
3.3.4 User Functions of the Resource Manager Class
3.3.4.1 Create User
3.3.4.2 Change Password
3.3.4.3 Drop User
3.3.5 Creating Publications
3.3.5.1 Defining Publication Items
3.3.5.2 Data Subsetting
3.3.5.3 Creating Publications Using Satellite Forms
3.3.6 Creating Publication Items
3.3.6.1 Null Sync Callout
3.3.7 Retrieving Publication Item Names
3.3.8 Creating Publication Item Indexes
3.3.8.1 Define Client Indexes
3.3.9 Adding Publication Items to the Publication
3.3.9.1 Read-only Publication Items
3.3.9.2 Defining Conflict Rules
3.3.9.3 Using Table Weight
3.3.10 Subscribing Users to a Publication
3.3.11 Creating Sequences
3.3.12 Partitioning Sequences for Client Devices
3.3.13 Defining Client Subscription Parameters to Publications
3.3.14 Instantiating the Subscription
3.3.15 Schema Evolution Using Alter Publication Item
3.3.15.1 Alter Publication Item
3.4 Publish and Subscribe Method Specialized Functions
3.4.1 Selective Synchronization
3.4.2 Callback Customization Using Compose and Apply
3.4.3 Defining Customized DML Operations
3.4.3.1 PL/SQL Code Example
3.4.4 Virtual Primary Key
3.4.4.1 Create Virtual Primary Key Column
3.4.4.2 Drop Virtual Primary Key Column
3.4.5 Restricting Predicate
3.4.6 Resolving Conflicts Using the Error Queue
3.4.6.1 Execute Transaction
3.4.6.2 Purge Transaction
3.5 Setting Up the Palm OS Emulator
3.6 Testing Replication on the Emulator
3.7 Mobile Server System Catalog Views
4 Sample Orders Application
4.1 Overview
4.2 Sample Orders Application Files
4.3 Enabling the Sample Orders Application
4.4 Using the Sample Application for the Palm Computing Platform
4.4.1 The Main Form
4.4.2 Changing the Sort Order
4.4.3 The Order Form
4.4.4 The Order Item Form
4.5 Installing the Sample Application on the Device
4.6 Replicating the Data to the Device
5 Programming Palm Applications
5.1 Development Interfaces
5.1.1 ODBC
5.1.2 Oracle Lite Object Kernel API
5.1.3 Mobile Sync API
5.1.3.1 ocSessionInit
5.1.3.2 ocSessionTerm
5.1.3.3 ocSaveUserInfo
5.1.3.4 ocDoSynchronize
5.1.3.5 ocSetTableSyncFlag
5.1.4 Mobile Sync API Data Structures
5.1.4.1 ocEnv
5.1.4.2 ocTransportEnv
5.2 Developing Applications for the Palm Computing Platform
5.2.1 Tools
5.2.1.1 Oracle Lite Mobile SQL for Palm Computing Platform
5.2.1.2 PUMATECH Satellite Forms
5.2.1.3 GNU GCC PRC-Tools
5.2.1.4 Metrowerks CodeWarrior
5.2.1.5 Palm OS Emulator
5.2.2 Creating the Oracle Lite Database on the Development System
5.2.3 Using Oracle Lite Mobile SQL for Palm Computing Platform
5.2.3.1 Installing Oracle Lite Mobile SQL for Palm Computing Platform
5.2.3.2 Starting Oracle Lite Mobile SQL for Palm Computing Platform
5.2.3.3 Creating a New Database with Oracle Lite Mobile SQL
5.2.3.4 Viewing Tables with Oracle Lite Mobile SQL
5.2.3.5 Using SQL in Oracle Lite Mobile SQL
5.2.4 Creating a Project in Metrowerks CodeWarrior
5.3 Testing Applications on the Palm OS Emulator
5.3.1 Testing Applications Created in Metrowerks CodeWarrior
5.3.2 Testing Your Application on the Palm Computing Device
5.3.2.1 Installing the Mobile Development Kit on the Palm Computing Device
5.3.2.2 Installing Your Application on the Palm Computing Device
5.3.2.3 Configuring Transport on Palm Computing Platform Devices
5.3.2.4 Using HTTP
5.3.2.5 Reassigning the HotSync Mechanism to HTTP Sync
5.3.2.6 Configuring HTTP Transport with HotSync
5.3.2.7 Setup for the Mobile Sync Client for Palm
6 Using the Packaging Wizard
6.1 Packaging Wizard Overview
6.2 Starting the Packaging Wizard
6.3 Platform Selection
6.4 Naming New Applications
6.4.1 Locating Platform Files
6.5 Listing Application Files
6.5.1 Sorting
6.5.2 Filters
6.6 Entering Database Information
6.7 Defining Snapshots For Replication
6.7.1 Creating New Snapshots
6.7.2 Importing Snapshots
6.7.3 Editing Snapshots
6.8 Completing the Application
6.8.1 The Application File
6.8.2 Creating JAR Files
6.8.3 Creating SQL Files
6.8.4 Restarting the Packaging Wizard
6.8.5 Publishing the Application
6.8.6 Editing Applications
A System Catalog Views
A.1 Oracle Lite Database Catalog Views
A.1.1 ALL_COL_COMMENTS
A.1.2 ALL_CONSTRAINTS
A.1.3 ALL_CONS_COLUMNS
A.1.4 ALL_INDEXES
A.1.5 ALL_IND_COLUMNS
A.1.6 ALL_OBJECTS
A.1.7 ALL_SEQUENCES
A.1.8 ALL_SYNONYMS
A.1.9 ALL_TABLES
A.1.10 ALL_TAB_COLUMNS
A.1.11 ALL_TAB_COMMENTS
A.1.12 ALL_USERS
A.1.13 ALL_VIEWS
A.1.14 CAT
A.1.15 COLUMN_PRIVILEGES
A.1.16 DATABASE_PARAMETERS
A.1.17 DUAL
A.1.18 SNAPSHOTS
A.1.19 TABLE_PRIVILEGES
A.1.20 USER_OBJECTS
B SQL Support
B.1 Oracle Lite for the Palm Computing Platform SQL Support
B.1.1 Supported SQL Statements
B.1.2 CREATE TABLE
B.1.3 DROP TABLE
B.1.4 CREATE INDEX
B.1.5 DELETE
B.1.6 DROP INDEX
B.1.7 INSERT
B.1.8 SELECT
B.1.9 UPDATE
B.1.10 COMMIT
B.1.11 ROLLBACK
B.1.12 Conditions
B.1.13 Comparison Operators
B.1.14 Literal Values
B.1.15 Supported Datatypes
B.1.16 Supported Group Functions
B.1.17 Supported Date Functions
C ODBC Support
C.1 Oracle Lite for the Palm Computing Platform 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
D Mobile SQL
D.1 Overview
D.1.1 Database Access
D.2 Installation and Setup
D.2.1 Starting and Stopping Mobile SQL
D.3 Main Form
D.4 Table Form
D.5 The SQL Form
D.6 The Edit Row Options
D.7 Palm OS-Specific Features
Glossary
Index
Copyright © 2002 Oracle Corporation
All rights reserved
Index