WAP之家:为您提供最全最新的WAP技术,CP.SP.3G等行业资讯。 WAP之家交流论坛全新开放 点击进入>>
WAP资讯 | 3G动态 | SP动态 | 运营商动态 | 内容商动态 | 制造商动态 | 论坛讨论>> 每次自动访问
WAP技术 | WAP源码 | 手机编程 | 手机源码 | 无线技术 | J2ME技术 | 手机软件 添加到收藏夹
IVR技术 | SP资料 | SMS MMS技术 | 商业方案 | IVR下载 | 书籍教程 | 工具软件 语言:繁體中文

WAP之家技术文章手机编程Win Mobile程序开发DataSet Server CE

DataSet Server CE
作者:Andy Sjostrom  来源:businessanyplace.net  发布时间:2005-12-22 0:19:37

Applies t
   Microsoft® Windows Mobile® 2003 software for Smartphones
   Microsoft Windows Mobile 2003 software for Pocket PCs
   Microsoft Visual Studio® .NET 2003
   Microsoft .NET Compact Framework 1.0

Summary: Learn how to use the sample project DataSet Server CE to reach and use remote databases from Smartphones and Pocket PCs running Windows Mobile 2003 software. (48 printed pages)

Download DataSet Server CE.msi from the Microsoft Download Center.

Note   DataSet Server CE is not a product and is not supported. DataSet Server CE is a sample project provided with source code that illustrates how you might perform data synchronization between a Windows Mobile-based Smartphone and a Microsoft SQL Server™. Microsoft plans to support SQL CE in a future version of Windows Mobile. THE INFORMATION PROVIDED IN THIS ARTICLE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.

Introduction

A significant number of Windows Mobile-based Pocket PC enterprise applications use Microsoft SQL Server 2000 Windows CE Edition (SQL Server CE) for data storage and data synchronization. Developers choose SQL Server CE for a variety of reasons, including its high performance, security, stability, easy programmatic access, and direct links to server-side Microsoft SQL Server 2000 databases. The purpose of this article is to show how to use the sample project DataSet Server CE to get data store and data synchronization features, similar to those of SQL Server CE, in application development for Smartphones running Windows Mobile 2003 software. DataSet Server CE uses ADO.NET DataSet and DataTable objects to store and manage data. The source code supplied with this article consists of the following projects:

  • DataSet Server CE client engine (DataSetServerCE.csdproj) — Class component that implements a RemoteDataAccess class with the same interfaces as SQL Server CE.
  • DataSet Web Service Server Agent (DataSetServerAgent.csdproj) — Server-side Web service that is similar to the SQL Server CE Server Agent. Manages communication with remote databases and implements the synchronization and tracking features.
  • Smartphone 2003 demonstration client (dssceClientSMP.csdproj) — A Windows Mobile 2003-based Smartphone client that uses the DataSet Server CE client to execute Pull, Push, and submitSQL statements.
  • Pocket PC 2003 demonstration client (dssceClientPPC.csdproj) — A Windows Mobile 2003-based Pocket PC client that uses the DataSet Server CE client to execute Pull, Push, and submitSQL statements.

The sample code illustrates the following key areas:

  • How to use DataSet and DataTable objects to manage local data.
  • How to pull data from a remote SQL Server to a Smartphone or Pocket PC running Windows Mobile2003. Again, SQL Server CE is the premiere choice for Pocket PC-based database applications. The only scenario where DataSet Server CE would be appropriate is when the amount of data stored and transferred is very low combined with very aggressive memory requirements (that is, low footprint). The footprint of DataSet Server CE is 12 kilobytes.
  • How to push tracked data changes back to the remote SQL Server.
  • How to pass non–row returning SQL statements, such as UPDATE and DELETE, to a remote SQL Server.
  • How to use the most key objects in the System.Data.OleDb namespace.
  • How to manage exception throughout a complete solution, including client, client component (DLL), Web service, and SQL Server.

DataSet Server CE Described

The DataSet Server CE sample project is a connectivity and database integration solution for .NET Compact Framework applications. Microsoft SQL Server 2000 Windows CE Edition (SQL Server CE) provides a solid foundation for disconnected, connected, synchronization, data transfer, and replication scenarios. However, while the Windows Mobile 2003-based Smartphone includes the .NET Compact Framework in ROM, SQL Server CE is not yet supported.

DataSet Server CE mimics the behavior of a SQL Server CE Remote Data Access class to pull and push data, as well as in submitting SQL statements to remote SQL Servers. The technical interfaces of the DataSet Server CE interfaces are, as far as technically possible, identical to those of SQL Server CE 2.0. The underlying data technologies used to accomplish this are ADO.NET DataSet and DataTable objects. The feature set of DataSet Server CE is designed to resemble that of SQL Server CE as closely as possible, including names of methods, properties, enumerations, and behavior.

Table 1 illustrates the similarities and differences between DataSet Server CE and SQL Server CE 2.0.

Table 1. DataSet Server CE versus SQL Server CE 2.0

Feature SQL Server CE 2.0 DataSet Server CE Comments
RemoteDataAccess
  • Pull
  • Push
  • submitSQL

X

X

X

X

X

X

DataSet Server can return number of affected rows.

Pull
  • TrackingOff
  • TrackingOn
  • TrackingOnWithIndexes
  • TrackingOffWithIndexes

X

X

X

X

X

X

(X)

(X)

Same as TrackingOn.

Same as TrackingOff but primary keys are also created.

Push
  • BatchingOff
  • BatchingOn

X

X

X

X

 
MergeReplication X    
ErrorsTable

(created when Pull implemented)

X    
Handles High Data Volume with no loss of performance X    
Supports Local Data Encryption X    
Compresses Data to Reduce Transit Times X    

[1] [2] [3] [4]  下一页

[] [返回上一页] [打 印]
文章评论

用户名: 查看更多评论

分 值:100分 85分 70分 55分 40分 25分 10分 0分

内 容:

         (注“”为必填内容。) 验证码: 验证码,看不清楚?请点击刷新验证码