SQL Server Mobile 2005 程序开发(四)

Slides:



Advertisements
Similar presentations
Web Role 的每台虚机运行有 IIS ,用于处理 Web 请求 Worker Role 用于运行后台进程 Cloud Service 是什么? 支持多层架构的应用容器 由多个 Windows 虚拟机集群构成 集群有两种类型: Web 和 Worker Cloud Service 做什么 进行应用的自动化部署.
Advertisements

泛舆情管理平台 ——助力媒体业务创新 新模式 新格局 创新盈利增长点 2/26/2017 1:59 AM 屈伟: 创始人,总裁
中国银行业前置端操作系统移植研究.
借助公有云实现游戏的弹性运营 Shaun Fang (方兴) Azure开发技术顾问
我国石化行业提升式发展措施 白颐 石油和化学工业规划院.
吴峻 软件设计工程师组长 Exchange Server 微软有限公司
王书贵 资深分析师 CCW Research 计世资讯
深市协助执法及证券查询业务介绍 客户服务部 China Securities Depository
顏協邦 慧盟資訊 商業智慧導入服務部 資深經理
Database Architecture, not only DBA
抱怨處理技巧 高雄捷運公司 公共事務處 胡宜萍 安全 ‧ 便捷 ‧舒適 ‧ 可靠
请点击以下链接下载WinHEC的演讲材料
1. 设定愿景,确定业务场景 Microsoft Corporation
金融信息安全人才培养的思考与实践 中央财经大学 朱建明 2012年11月24日.
广东省广州市花都区教育局教研室 汤少冰 优化评估方式, 促进中学英语的教与学 广东省广州市花都区教育局教研室 汤少冰
張書源 Microsoft MVP MCT 趨勢科技 技術經理 網酷科技 資深顧問 集英信誠 資深顧問
Office 2013 全新功能介紹 台灣微軟 Office 大使 楊承恩 Marcus Microsoft Office
——打造科技金融升级版 中国建设银行顺德分行 2015年6月.
2017年9月14日12时3分 DEV349 Visual C 无缝集成,无限潜力 李建忠 微软特约讲师 上海祝成科技
四川省集体林权流转平台 中国西部林权交易网
全国信息技术标准化技术委员会 (SAC/TC28)工作交流
DEV323 .NET架构:全球化思想! 定制各种文化及国际数据
IIS網站的安全性管理 羅英嘉 2007年4月.
MBL 340 Tablet PC SDK:在您的应用程序中使用数字墨水
解振宇 客户技术经理 客户售前技术部 微软中国有限公司广州办事处
11/17/2018 5:15 PM 病毒,间谍软件最新趋势 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes.
Mobile & Embedded DevCon 2005 朱敏博士 微软有限公司
从UNIX到Windows的 电信软件移植实践
Microsoft Office SharePoint Server 2007 事件追蹤與專案管理
利用最新Hyper-V Replica 功能達成Hyper-V 災難備援機制
BizTalk Server 2004.
MSG 330 Exchange服务器性能调节技巧
服務啟用、導入流程、 郵件移轉步驟簡介 Microsoft Office 12/2/2018
OFC351 利用Office System开发复杂的商务解决方案 架构、模式、场景
MBL 325 开发跨平台的 Windows Mobile应用程序
MBL 327 Windows Mobile开发中的异构系统集成
MBL355 用.NET精简版2.0和SQL Server 2005打造强力智能客户端
BizTalk Server 2004.
第十章 IDL访问数据库 10.1 数据库与数据库访问 1、数据库 数据库中数据的组织由低到高分为四级:字段、记录、表、数据库四种。
使徒行傳 21:17-23章「保羅的見證(一)」 引言 預言保羅為主的名受許多的苦難的實現
SQL Server Mobile 2005 程序开发(一)
凌宁 系统工程师 亚洲区嵌入式系统事业群 微软(中国)有限公司
2/24/2019 5:40 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
OFC321 InfoPath在企业解决方案中应用的最佳实践
SQL Server Mobile 2005 程序开发(三)
橫跨電腦、手機與軟體的全方位端點管控解決方案
SQL Server Mobile 2005 程序开发(五)
可愛的鍬形蟲 五年四班2.
VB与Access数据库的连接.
4/30/2019 7:40 AM 約翰福音 15:9;17:20-23 加拉太書 6:1-2 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
模式与实践:Windows Mobile 5.0应用程序架构
DEV 343 VS2005超快速开发方案/EEP2006控件包.
5/4/2019 4:42 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
DEV342 Visual Basic 2005: 应用程序框架 和高级语言特性
微軟資安稽核解決方案 System Center 2012
5/5/2019 7:06 PM 两跨框架梁截面配筋图的绘制 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may.
SQL Server Mobile 2005 程序开发(二)
MBL302 设计Windows Mobile应用程序的用户界面
DEV 343 VS2005超快速开发方案/EEP2006控件包.
Delphi 7.0开发示例.
会议编号 Visual Studio 2005与SQL 2005协同工作
蔺华 ISV开发合作经理 平台及开发技术部 微软(中国)有限公司
使用ADO访问数据库 李宝智 BonizLee 课程 10564A
MSG 361 如何从Exchange 5.5迁移 胡义 咨询顾问 上海星移软件有限公司 2019年7月31日8时9分
DEV310 Microsoft Visual Studio 2005托管代码调试
進階應用層防火牆實務 謝長明 技術總監 長成資訊顧問股份有限公司.
強化 Windows 平台 唐任威 資深講師.
高擴充高穩定高安全 企業級資料管理平台 Report Builder概論 錢曉明 資策會 資深講師 台灣微軟 資深講師.
DEV243 Visual Studio Team System 测试深入探讨
Windows Workflow Foundation CON 230
Presentation transcript:

SQL Server Mobile 2005 程序开发(四) 2019年1月13日12时30分 SQL Server Mobile 2005 程序开发(四) 黎 波 30分钟 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

内容 配置 Web 同步向导 远程数据访问(RDA) SqlCeRemoteDataAccess 的属性 2019年1月13日12时30分 内容 配置 Web 同步向导 远程数据访问(RDA) SqlCeRemoteDataAccess 的属性 SqlCeRemoteDataAccess 的方法 演示用 RDA 方式同步数据 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

目标 了解数据同步的部署环境 了解配置 Web 同步向导 掌握 SqlCeRemoteDataAccess 的基本使用 2019年1月13日12时30分 目标 了解数据同步的部署环境 了解配置 Web 同步向导 掌握 SqlCeRemoteDataAccess 的基本使用 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

为何需要数据同步?

2019年1月13日12时30分 数据同步的部署环境 Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile) 依靠客户端与服务器环境中的多个组件在设备和 Microsoft SQL Server 实例之间交换数据。 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

DEMO 演示:配置 Web 同步向导 2019年1月13日12时30分 演示通过编程方式创建、修复、压缩和收缩数据库,最后演示如何正确处理 SqlCeException。 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

2019年1月13日12时30分 远程数据访问(RDA) © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

SqlCeRemoteDataAccess 类

SqlCeRemoteDataAccess 常用属性 InternetUrl 指定在连接到 SQL Server Mobile Server Agent 时使用的 URL。SQL Server Mobile Server Agent 是将 SQL Server Mobile 客户端连接到 Microsoft SQL Server 数据库的 Microsoft 信息服务 (IIS) ISAPI DLL。必须指定此属性。 InternetLogin 和 InternetPassword 指定在连接到 SQL Server Mobile Server Agent 时使用的 Microsoft Internet 信息服务 (IIS) 登录名和密码。 InternetProxyLogin 和 InternetProxyPassword 指定在连接到需要进行身份验证的代理服务器)时使用的登录名。 InternetProxyServer 指定访问 InternetUrl 属性中指定的 HTTP 资源时使用的代理服务器。 LocalConnectionString 指定 SQL Server Mobile 数据库的连接字符串。

SqlCeRemoteDataAccess 其他属性 2019年1月13日12时30分 SqlCeRemoteDataAccess 其他属性 CompressionLevel 指定压缩例程在推送和提取操作期间将使用的压缩量。值 0 关闭所有压缩。默认值是 1,它占用的处理器时间最少,但仍能提供一些压缩。 ConnectionManager 启用 SqlCeRemoteDataAccess 对象以使用智能设备的连接管理器 API 来建立网络连接。同步结束时将释放连接。在需要代理设置时,如果设置了 InternetProxyServer、InternetProxyLogin 或 InternetProxyPassword 属性,则 SqlCeRemoteDataAccess 对象将不使用连接管理器代理设置。 CompressionLevel 指定压缩例程在推送和提取操作期间将使用的压缩量。使用 CompressionLevel 属性,您可以自定义压缩,以满足您的特定需要。如果值较低,压缩程序运行得就较快,但传输的数据没有进行紧密压缩,因此传输的时间较长。如果压缩级别值较高,则在运行 IIS 的服务器上将进行较多的处理,但可以减少数据传输时间。 数据压缩的实际量取决于所压缩的数据的类型。 值 0 关闭所有压缩。默认值是 1,它占用的处理器时间最少,但仍能提供一些压缩。 ConnectionManager 启用 SqlCeRemoteDataAccess 对象以使用智能设备的连接管理器 API 来建立网络连接。同步结束时将释放连接。 如果 ConnectionManager 属性设置为 true,则总是使用连接管理器建立连接。在需要代理设置时,除非设置了 RDA 对象的任何代理属性,否则将使用连接管理器的代理设置。如果设置了 InternetProxyServer、InternetProxyLogin 或 InternetProxyPassword 属性,则 SqlCeRemoteDataAccess 对象将不使用连接管理器代理设置。 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

SqlCeRemoteDataAccess 的方法 Pull Push SubmitSql

Pull 方法 // 从远程 SQL Server 数据库下载数据,并将这些数据存储在 // 本地 SQL Server Mobile 数据库的一个表中。 public void Pull ( string localTableName, //本地SQL Mobile表名 string sqlSelectString, //Select语句或存储过程 string oleDBConnectionString, //远程OLEDB数据连接字符串 RdaTrackOption trackOption, string errorTable ) trackOption 该选项指示 SQL Server Mobile 是否跟踪对提取的表所做的更改,以及提取的表上存在的索引是否转到具有主键约束的设备。 errorTable 一个本地错误表名称;以后在调用 Push 方法向 SQL Server 发送更改时,如果引发了错误,就会创建此本地错误表。

RdaTrackOption 枚举 TrackingOff 指示 SQL Server Mobile 不跟踪对所提取的表的更改。本地不创建任何 PRIMARY KEY 约束。 TrackingOffWithIndexes 指示 SQL Server Mobile 不跟踪对所提取的表的更改。在本地表上创建 sqlSelectString 中指定的 SQL Server 表上存在的索引和主键约束。 TrackingOn 指示 SQL Server Mobile 跟踪对所提取表的所有更改。本地表中将创建与为 sqlSelectString 指定的值相关的 PRIMARY KEY 约束。这是默认设置。 TrackingOnWithIndexes 指示 SQL Server Mobile 跟踪对所提取表的所有更改。在本地表上创建 sqlSelectString 中指定的 SQL Server 表上存在的索引和主键约束。

Pull 方法示例代码 // 实例化并配置 SqlCeRemoteDataAccess 对象 SqlCeRemoteDataAccess rda = new SqlCeRemoteDataAccess(); rda.InternetUrl = "http://www.adventure-works.com/sqlmobile/sqlcesa30.dll"; rda.InternetLogin = "MyInternetLogin"; rda.InternetPassword = "<password>"; rda.LocalConnectionString = "Data Source=MyDatabase.sdf"; // 从 SQL Server 下载数据 rda.Pull( "Employees", "SELECT * FROM DimEmployee", "Provider=sqloledb;server=MySqlServer;database=AdventureWorks;uid=sa;pwd=;", RdaTrackOption.TrackingOnWithIndexes, "ErrorTable");

Push 方法 // 将 SQL Server Mobile 中跟踪的提取表中的更改传送回 // 原始 SQL Server 表。 public void Push ( string localTableName, string oleDBConnectionString, RdaBatchOption batchOption ) batchOption 此选项指示正发送回 SQL Server 表的更改是组成一批共用同一事务,还是分别应用。 BatchingOff 指示 SQL Server Mobile 对推入 SQL Server 的行不执行批处理。服务器分别处理每一行。这是默认设置。 BatchingOn 指示 SQL Server Mobile 将推入 SQL Server 中的所有行组成一批,归并到一个事务中。

SubmitSql 方法 // 提交将在远程服务器上 Microsoft SQL Server 中的数据库上 // 执行的 SQL 语句。 public void SubmitSql ( string sqlString, string oleDBConnectionString )

DEMO 演示:用 RDA 方式同步数据 2019年1月13日12时30分 演示通过编程方式创建、修复、压缩和收缩数据库,最后演示如何正确处理 SqlCeException。 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

小结 配置 Web 同步向导 远程数据访问(RDA) SqlCeRemoteDataAccess 的属性和方法 2019年1月13日12时30分 小结 配置 Web 同步向导 远程数据访问(RDA) SqlCeRemoteDataAccess 的属性和方法 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

2019年1月13日12时30分 Q & A © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

2019年1月13日12时30分 Thank You! © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

学习资源 SQL Server Mobile 2005 研究报告 SQL Server Mobile 联机丛书 2019年1月13日12时30分 学习资源 SQL Server Mobile 2005 研究报告 SQL Server Mobile 联机丛书 SQL Server 移动版产品概览 SQL Server 移动版特性 SQL Server 2005 Mobile Edition Datasheet 升级到 Microsoft SQL Server 移动版 MSDN Library © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.