DataSet Server CE(转)

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

FeatureSQL Server CE 2.0DataSet Server CEComments
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

MergeReplicationX
ErrorsTable

(created when Pull implemented)

X
Handles High Data Volume with no loss of performanceX
Supports Local Data EncryptionX
Compresses Data to Reduce Transit TimesX

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10294527/viewspace-126733/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10294527/viewspace-126733/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
sql server ce 的工具 非常有用 SQL Server 2005 移动版(SQL Server Mobile)或SQL Server 2000 Windows CE 2.0版(SQL Server CE 2.0)的企业和个人用户如果计划与SQL Server 2000或SQL Server 2005数据库保持同步,需要在您运行Microsoft Internet Information Services(IIS)的服务器上安装互联工具。 本页内容表述的是互联工具。请注意文件名中的“xx”是代表安装语言的标识符。最初仅有英文互联工具信息(“en”即标识符“XX”)。为满足向后兼容的需要,我们提供SQL Server CE 2.0复制软件。 请查阅安装互联工具的设置说明。 1. Microsoft SQL Server 2005移动版服务器工具(sqlce30setupxx.msi)在IIS 箱中安装SQL Server Mobile复制组件。 这个组件用于把移动设备中的SQL Server Mobile连接到SQL Server 2005、SQL Server 2000 SP3a、及 SQL Server 2000 SP4数据库。 2. Microsoft SQL Server 2000 Service Pack 4复制组件(sql2kxxsp4.msi)在IIS机器中安装SQL Server 2000 SP3a复制组件。这个组件用于把移动设备中的SQL Mobile数据库连接到SQL Server 2000 SP4数据库。 3. Microsoft SQL Server 2000 Service Pack 3a复制组件(sql2kxxsp3a.msi)在IIS机器中安装 SQL Server CE 2.0 及 SQL Server 2000 SP4 复制组件。 该组件用于把移动设备中的SQL Server CE 2.0数据库连接到SQL Server 2000 SP3a数据库。 4. 用于SQL Server 2000 SP4 (sqlce20sql2ksp4.exe)的SQL Server CE 2.0 复制组件在IIS机器中安装 SQL Server CE 2.0 及 SQL Server 2000 SP4 复制组件。该组件用于把移动设备中的SQL Server CE 2.0数据库连接到SQL Server 2000 SP4。 5. 用于SQL Server 2000 SP3a (sqlce20sql2ksp3a.exe)的SQL Server CE 2.0复制组件在IIS机器中安装SQL Server CE 2.0 及 SQL Server 2000 SP3a 复制组件。该组件用于把移动设备中的SQL Server CE 2.0数据库连接到SQL Server 2000 SP3a 数据库
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值