没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
Tutorial for Building Mobile Applications for Windows CE 20-1
20
Tutorial for Building Mobile Applications for
Windows CE
You can implement Mobile applications with Oracle Database Lite for WinCE. Oracle
Database Lite supports various application models for the Windows Mobile/Pocket
PC device, such as ODBC, JDBC, and ADO.NET. When developing your own WinCE
application, you can use Visual Studio 2005.
This chapter uses a tutorial to demonstrate how to create, deploy, administer, and use
a Windows CE application. The tutorial shows a Visual Basic.NET (Visual Studio.NET)
application that uses the Oracle Database Lite ADO.NET interface for Windows
Mobile.
The following sections detail the development process:
■ Section 20.1, "Overview of the WinCE Sample Application"
■ Section 20.2, "Develop the Application"
■ Section 20.3, "Create Publication for Application"
■ Section 20.4, "Package and Publish the Application"
■ Section 20.5, "Administer the Application"
■ Section 20.6, "Run the Application on the Windows Mobile/Pocket PC Device"
20.1 Overview of the WinCE Sample Application
The sample WinCE application details typical activities of delivery personnel in the
Transportation and Logistics industry, which includes package pick-up and delivery.
1. Before he leaves the dispatch center, the delivery person collects the complete
delivery package list and the package delivery destination information for the day
on his device.
2. As he delivers and picks-up packages, the delivery person updates the package
pick-up and delivery status on his client device.
3. When he returns to the dispatch center, he synchronizes his updated information
with the central server running in the dispatch center over any wireless network.
20.1.1 Before You Start
Before starting the Mobile application development process, you must ensure that the
development computer and the client device meet the requirements specified below.
■ Section 20.1.1.1, "Application Development Computer Requirements"
Develop the Application
20-2 Oracle Database Lite Developer’s Guide
■ Section 20.1.1.2, "Client Device Requirements"
20.1.1.1 Application Development Computer Requirements
Table 20–1 lists the configuration and installation requirements for the Mobile
application development computer.
20.1.1.2 Client Device Requirements
You must connect the client device to the desktop and install the Oracle Database Lite
client for Pocket PC on the device. For more information on how to install the Mobile
Client on the device, see Section 20.6.1, "Install the Oracle Database Lite Mobile client
for Pocket PC".
20.2 Develop the Application
This section explains how to develop and test the WinCE Transport application using
the Mobile Development Kit. The WinCE Transport application is written in Visual
Basic.NET (Visual Studio.NET).
To develop and test the WinCE Transport application, perform the following tasks.
1. Section 20.2.1, "Create Database Objects in the Oracle Server"
2. Section 20.2.2, "Write the Application Code"
3. Section 20.2.3, "Compile the Application"
20.2.1 Create Database Objects in the Oracle Server
During deployment, the Mobile Server automatically creates the Oracle Database Lite
database in the client device along with the requisite tables and data. To publish the
application, users must create the database objects used by the application in the
back-end Oracle database.
20.2.1.1 The WinCE Transport Application Database Objects
The WinCE Transport application uses the following database objects:
■ Packages Table
■ Routes Table
■ Trucks Table
Table 20–1 Application Development Computer Requirements
Requirement Description
Windows NT/2000/XP User Login The login user on the Windows NT/2000 development
computer must have "Administrator" privileges.
Installed Java Components Java Development Kit 1.4.2 or higher.
Installed Oracle Database Lite 10g
Components
Oracle Database 9.2 or higher.
The Mobile Server (Oracle Database Lite CD-ROM).
The Mobile Development Kit (Oracle Database Lite
CD-ROM).
Installed Windows Mobile/Pocket
PC Components
Microsoft Active Sync 3.8 or higher.
Develop the Application
Tutorial for Building Mobile Applications for Windows CE 20-3
Table 20–2 lists the columns for the Packages table for storing information about the
package.
Table 20–3 lists the columns for the Routes table for storing information about a route.
Table 20–4 lists columns for the Trucks table for storing information about the
availability status and destination information for a truck.
To Create Database Objects
In order to execute the Transport demo, you must set up the schema and the database
objects. We have provided a SQL script that will create the master schema and the
database objects in the back-end. However, if the master schema is already created,
then remove the statements that create this schema from the create.sql script.
Table 20–2 Packages Table
Column Description
DID Package ID
DDSC Package Description
DWT Package Weight
DSTR Destination Street
DCTY Destination City
DST Destination State
DRTNR Route Number
DRTNM Route Name
DESN Signature
DSTS Package Status
TID Truck Number
PRTY Priority
PTNO Point Number
TIND Delivery 'D', or Pick-up 'P'
Table 20–3 Routes Table
Column Description
ROUTE_NO Route Number (Primary Key)
ROUTE_NM Route Name
EST_TIME Estimated Time
Table 20–4 Trucks Table
Column Description
TRUCK_NO Truck Number (Primary Key)
TRUCK_STATUS Status of the Truck
ALERT_ADDRESS Mobile or Pager address to send alert to
(Portal User Interface)
DRIVER_ID ID of the Truck Driver
Develop the Application
20-4 Oracle Database Lite Developer’s Guide
Execute the create.sql script, as follows:
> cd ORACLE_HOME\Mobile\Sdk\samples\ado.net\wince\Transport\sql
> msql system/<sys_pwd>@jdbc:oracle:thin:@<host>:<port>:
<oracle_sid> @create.sql
Where:
■ <sys_pwd> is the system password. This is required if you are creating the
master schema. However, if you have eliminated the statements that create the
schema, you can use master/master for username/password.
■ <host>:<port> refers to the name and listening port of the machine where the
back-end Oracle database is installed.
20.2.2 Write the Application Code
The WinCE Transport application, located in cd ORACLE_
HOME\Mobile\Sdk\samples\ado.net\wince\Transport, uses Visual
Basic.NET (Visual Studio.NET), which is available with the sample application. The
following sections describe the Transport application code:
■ Section 20.2.2.1, "Transport Module (Transport.vb)"
■ Section 20.2.2.2, "Main Form (frmMain.vb)"
■ Section 20.2.2.3, "View Packages (frmView.vb)"
■ Section 20.2.2.4, "Create Package (frmNew.vb)"
20.2.2.1 Transport Module (Transport.vb)
To open a database connection, you must declare a connection object,. which—in this
tutorial—is called conn. The scope of the connection object is project level. The
Connect sub-routine in the transport.vb module establishes a connection to the
local Oracle Lite database with the DSN transport; the Disconnect sub-routine
releases the connection.
Within the Connect sub-routine, the DSN is initialized as follows:
Dim dsn As String = "dsn=transport;uid=system;pwd=" & pwd
conn = New Oracle.DataAccess.Lite.OracleConnection(dsn)
conn.Open()
The DSN username and password are system and the user password; thus, only the
user can connect since the user password is used.
Note: Ensure that the CLASSPATH includes classes12.jar or
classes12.zip.
Note: While entering the above command to create database
objects, you must include a mandatory space between
"<oracle_sid>" and "@create.sql".
剩余17页未读,继续阅读
dowsamdongdeli
- 粉丝: 3
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于opencv的dnn模块实现Yolo-Fastest的目标检测python源码+模型+说明(高分项目).zip
- 使用Python调用微信本地ocr服务.zip
- 【精品推荐】人工智能在医疗中的应用.pptx
- 【精品推荐】电子医疗仪器人机接口-(1).ppt
- 【精品推荐】电子医疗仪器人机接口.ppt
- ubuntu镜像ubuntu镜像01
- 基于paddle搭建神经网络实现5种水果识别分类python源码+数据集(高分毕设).zip
- 【精品推荐】电子商务网店类型介绍.ppt
- 基于paddle搭建神经网络实现水果识别分类python源码+数据集(高分项目).zip
- 三菱plc编程口通信学习笔记.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页