SlideShare a Scribd company logo
Windows Mobile:  Data Access and Storage Vinod Kumar M Technology Evangelist Microsoft India http://blogs.sqlxml.org/vinodkumar http://www.ExtremeExperts.com
Where We’re Going today What’s New In… Changes in SQL Mobile Direct Data Management Connectivity and Data Transfer Tools and Productivity Enhancements
Changes in SQL Mobile
Changes in SQL Mobile Key new features Multi-user Support Can now access the same database from multiple programs simultaneously Improved Query Processor More optimized No longer necessary to Compact to update statistics
Changes in SQL Mobile Desktop Support SQL Mobile now available on the Desktop Databases can now be created on the desktop Can now transfer a database using ActiveSync (no server engine required) Can now administer database from desktop
Changes in SQL Mobile Smartphone Smartphone now supports SQL Mobile Full featured support Create, Query, Transactions… Databinding DataGrid
Direct Data Management
Direct Data Management SqlCeResultset Updatable scrolling SQL Mobile cursor Dataset Improved parity with full .NET Framework Easier to synchronize changes to/from full .NET Framework XML XML Serialization XPath Support XML Schema
SqlCeResultSet SqlCeResultSet Provides direct connectivity to the SQL Server Mobile Edition database Supports forward and backward scrolling Supports updates Supports databinding
SqlCeResultSet Features vs. Performance Features comparable to DataSet commonly used features Scrolling Updatability Databinding Performance similar to SqlCeDataReader Direct db access No in-memory data duplication
SqlCeResultSet Compatability with SqlCeDataReader Inherits from SqlCeDataReader Provides strongly typed getters GetInt32(), GetString(), etc. Provides SqlCeDataReader forward Read() method Fully compatible with existing SqlCeDataReader code you may have
SqlCeResultSet Usage Created from SqlCeCommand ExecuteResultSet method Specific behavior controlled by ResultSetOptions enumeration
SqlCeResultSet Usage (continued) string sql = "Select ProductId, Desc, Qty, UnitPrice"; SqlCeConnection conn =  new SqlCeConnection(@"Data Source = \Orders.sdf"); SqlCeCommand commmand = new SqlCeCommand(sql, conn); SqlCeResultSet rs =  commmand.ExecuteResultSet(ResultSetOptions.None); while (rs.Read()) { // retrieve column values from the current record }
SqlCeResultSet Updatability Full Support for updatability Use ResultSetOptions.Updatable when executing the command Use strongly typed Setters to modify columns SetInt32, SetString Call Update method to save record changes to the database
SqlCeResultSet Updatability(continued) SqlCeResultSet rs =  commmand.ExecuteResultSet(ResultSetOptions.Updatable); int idxProductId = rs.GetOrdinal("ProductId"); int idxDesc = rs.GetOrdinal("Desc"); int idxUnitPrice = rs.GetOrdinal("UnitPrice"); while (rs.Read()) { // Retrieve current values string productId = rs.GetString(idxProductId); string desc = rs.GetString(idxDesc); double unitPrice = rs.GetDouble(idxUnitPrice); // Prepend Product ID to the description rs.SetString(idxDesc, productId + " - " + desc); // Increase the price by 10% rs.SetDouble(idxUnitPrice, unitPrice * 1.1); // Apply record changes to db rs.Update(); }
SqlCeResultSet Scrolling Access Supports scrolling and direct record access Use ResultSetOptions.Scrollable when executing the command Provides Readxxx commands ReadFirsts, ReadLast Read, ReadPrevious ReadAbsolute ReadRelative
SqlCeResultSet Scrolling Access (continued) SqlCeResultSet rs =  commmand.ExecuteResultSet(ResultSetOptions.Scrollable |  ResultSetOptions.Updatable ); // Read entire result backwards rs.ReadLast(); while(rs.ReadPrevious(); {  // ... } // Absolute positioning rs.ReadAbsolute(10);  // Read 10 records from beginning rs.ReadAbsolute(-10); // Read 10 records from end // Relative positioning rs.ReadRelative(5);  // Read forward 5 records rs.ReadRelative(-5);  // Read backward 5 records
SqlCeResultSet Databinding Create result set as normal All ResultSetOptions allowable Should include ResultSetOptions.Scrollable Bind to the ResultSetView property of the result set Provides same interfaces as DataView ITypedList, IBindingList, IList, ICollection, IEnumerable, IDisposable Can be used with any bindable controls
SqlCeResultSet Databinding  (continued) SqlCeResultSet rs =  commmand.ExecuteResultSet(ResultSetOptions.Scrollable); listBox1.DataSource = rs.ResultSetView; listBox1.DisplayMember = "Desc"; listBox1.ValueMember = "ProductId"; textBox1.DataBindings.Add("Text", rs, "UnitPrice");
DataSet Several new methods added New methods improve parity with desktop New methods make synchronizing changes much easier
DataSet New Features/Methods Serialization methods now supported on a single table DataSet.Copy method DataSet.GetChanges method DataSet.Merge
DataSet DataTable Serialization An individual data table can now be saved and restored WriteXml ReadXml An individual data table can now be sent or received as a web service argument Simply pass as an argument
DataSet DataTable Serialization private void DeptComplete(string deptName, DataSet ds) { DataTable dt = ds.Tables["DeptDetail"]; dt.WriteXml(deptName + ".xml"); dt.Clear(); } private void DeptRestore(string deptName, DataSet ds) { DataTable dt = ds.Tables["DeptDetail"]; dt.Clear(); dt.ReadXml(deptName + ".xml"); }
DataSet Copy Method Copy creates an exact duplicate Copy includes both data and schema Useful for transferring a snapshot  Snapshot can be sent in background Application can still continue to function and modify original DataSet
DataSet Copy Method (continued) [WebMethod] public void SaveSnapshot(DataSet ds) { WriteDataSetToDatabase(ds); } private void Upload(DataSet ds) { DataServerProxy wsProxy = new DataServerProxy(); wsProxy.SaveSnapshot(ds); } Target Web Service Device call – Too slow, user must wait for whole upload
DataSet Copy Method (continued) private void Upload(DataSet ds) { DataServerProxy wsProxy = new DataServerProxy(); wsProxy.BeginSaveSnapshot(ds, null, null); } private void Upload(DataSet ds) { DataServerProxy wsProxy = new DataServerProxy(); DataSet dsDupe = ds.Copy(); wsProxy.BeginSaveSnapshot(dsDupe, null, null); } Device call – Changes to data during upload will corrupt upload Device call – Send copy in background, this is safe
DataSet Getting changes GetChanges method Retrieves changes since DataSet was loaded or AcceptChanges was called Changes returned as a DataSet The returned DataSet will generally be much smaller then original DataSet Returned DataSet is optimized for merging
DataSet Merging Changes Merge method Merges a DataSet into the current DataSet Data is matched up based on primary key Additions, deletions, modifications in the source DataSet are applied to the target
DataSet Retrieving Changes from server [WebMethod] public DataSet GetLatest(DateTime startingDate) { return RetrieveChangesFromDatabase(startingDate); } private void GetUpdates(DataSet currentDs,  DateTime lastUpdate) { DataServerProxy wsProxy = new DataServerProxy(); DataSet changeDs = wsProxy.GetLatest(lastUpdate); currentDs.Merge(changeDs); } Web method on server Call to web method from device
DataSet Sending Changes to the server [WebMethod] public void StoreUpdates(DataSet changeDs) { ApplyChangesToDataBase(changeDs); } private void SendChanges(DataSet currentDs) { DataServerProxy wsProxy = new DataServerProxy(); DataSet changeDs = currentDs.GetChanges(); wsProxy.StoreUpdates(changeDs); } Web method on server Call to web method from device
XML Support Added more XML features Greater parity with the full framework XML Serialization XPath XML Schema
XML Serializer Classes can now be serialize/deserialized XmlSerializer class is the engine Serialize saves class instance as XML Deserialize restores the class instance Serialization Control Class must have default constructor Attributes can control details XmlElement XmlAttribute
XPath XPath now supported by XmlDocument Rich support for XPath queries Notably simplifies XML processing Methods SelectNode  Returns a single matching node SelectNodes Returns list of matching nodes
XmlSchema XmlSchema provides XML validation engine Eliminates the need to validate explicitly in code Useful for verifying that a document appears as expected Useful for verifying content to legacy web services Can programmatically construct schemas
Connectivity and Data Transfer
Connectivity and Data Transfer Detecting changes in connectivity Your application can now respond to changes in connectivity!! Your application can the know type of connectivity (GPRS, Modem, ActiveSync…) MSMQ Reliable message delivery Automatically handles connectivity
Connectivity Detecting changes in connectivity Device connectivity is inconsistent Connectivity comes and goes Type of connectivity may vary during application lifetime GPRS Modem ActiveSync WiFi Applications must behave gracefully in the face of these changes
Tools and Productivity Enhancements
Tools and Productivity Enhancements Visual Studio for Devices Manage device databases from your desktop!! Copy SQL Mobile databases between your desktop and device Generating typed Datasets
Create and Manage  Can now administer database from the desktop Create new database Add tables Define columns and indexes
Create New Database
Creating New Table
Automatically adds to device
Typed DataSets .NET CF now supports typed DataSets Provides strongly typed table structure Strongly typed properties of the column getters
Summary Great enhancement to SQL Mobile SqlCeResultSet provides updatable, scrollable cursor DataSet provides new methods to make sync easier Rich XML support Can easily detect connectivity Tools make device DB development as easy as server-based DB’s
For The Contest Questions and The Feedback Form, please log on to: http://www.microsoft.com/India/ webcasts/eval/jan170430
© 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Ad

More Related Content

What's hot (20)

Ch 7 data binding
Ch 7 data bindingCh 7 data binding
Ch 7 data binding
Madhuri Kavade
 
ADO.NET -database connection
ADO.NET -database connectionADO.NET -database connection
ADO.NET -database connection
Anekwong Yoddumnern
 
Ado.net
Ado.netAdo.net
Ado.net
Iblesoft
 
ADO.NET by ASP.NET Development Company in india
ADO.NET by ASP.NET  Development Company in indiaADO.NET by ASP.NET  Development Company in india
ADO.NET by ASP.NET Development Company in india
iFour Institute - Sustainable Learning
 
ADO.NET
ADO.NETADO.NET
ADO.NET
Farzad Wadia
 
Data Love Conference - Window Functions for Database Analytics
Data Love Conference - Window Functions for Database AnalyticsData Love Conference - Window Functions for Database Analytics
Data Love Conference - Window Functions for Database Analytics
Dave Stokes
 
Using New Data Types In2008
Using New Data Types In2008Using New Data Types In2008
Using New Data Types In2008
PhilWinstanley
 
5\9 SSIS 2008R2_Training - DataFlow Basics
5\9 SSIS 2008R2_Training - DataFlow Basics5\9 SSIS 2008R2_Training - DataFlow Basics
5\9 SSIS 2008R2_Training - DataFlow Basics
Pramod Singla
 
Ado .net
Ado .netAdo .net
Ado .net
Manish Singh
 
ASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And RepresentationASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And Representation
Randy Connolly
 
Ado.net
Ado.netAdo.net
Ado.net
Om Prakash
 
Ado.net
Ado.netAdo.net
Ado.net
dina1985vlr
 
Ado.Net Tutorial
Ado.Net TutorialAdo.Net Tutorial
Ado.Net Tutorial
prabhu rajendran
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NET
rchakra
 
For Beginners - Ado.net
For Beginners - Ado.netFor Beginners - Ado.net
For Beginners - Ado.net
Tarun Jain
 
ASP.NET 09 - ADO.NET
ASP.NET 09 - ADO.NETASP.NET 09 - ADO.NET
ASP.NET 09 - ADO.NET
Randy Connolly
 
Database connectivity to sql server asp.net
Database connectivity to sql server asp.netDatabase connectivity to sql server asp.net
Database connectivity to sql server asp.net
Hemant Sankhla
 
6.1\9 SSIS 2008R2_Training - DataFlow Transformations
6.1\9 SSIS 2008R2_Training - DataFlow Transformations6.1\9 SSIS 2008R2_Training - DataFlow Transformations
6.1\9 SSIS 2008R2_Training - DataFlow Transformations
Pramod Singla
 
Database Connection
Database ConnectionDatabase Connection
Database Connection
John Joseph San Juan
 
7\9 SSIS 2008R2_Training - Script Task
7\9 SSIS 2008R2_Training - Script Task7\9 SSIS 2008R2_Training - Script Task
7\9 SSIS 2008R2_Training - Script Task
Pramod Singla
 
Data Love Conference - Window Functions for Database Analytics
Data Love Conference - Window Functions for Database AnalyticsData Love Conference - Window Functions for Database Analytics
Data Love Conference - Window Functions for Database Analytics
Dave Stokes
 
Using New Data Types In2008
Using New Data Types In2008Using New Data Types In2008
Using New Data Types In2008
PhilWinstanley
 
5\9 SSIS 2008R2_Training - DataFlow Basics
5\9 SSIS 2008R2_Training - DataFlow Basics5\9 SSIS 2008R2_Training - DataFlow Basics
5\9 SSIS 2008R2_Training - DataFlow Basics
Pramod Singla
 
ASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And RepresentationASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And Representation
Randy Connolly
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NET
rchakra
 
For Beginners - Ado.net
For Beginners - Ado.netFor Beginners - Ado.net
For Beginners - Ado.net
Tarun Jain
 
Database connectivity to sql server asp.net
Database connectivity to sql server asp.netDatabase connectivity to sql server asp.net
Database connectivity to sql server asp.net
Hemant Sankhla
 
6.1\9 SSIS 2008R2_Training - DataFlow Transformations
6.1\9 SSIS 2008R2_Training - DataFlow Transformations6.1\9 SSIS 2008R2_Training - DataFlow Transformations
6.1\9 SSIS 2008R2_Training - DataFlow Transformations
Pramod Singla
 
7\9 SSIS 2008R2_Training - Script Task
7\9 SSIS 2008R2_Training - Script Task7\9 SSIS 2008R2_Training - Script Task
7\9 SSIS 2008R2_Training - Script Task
Pramod Singla
 

Viewers also liked (8)

Q3 2009 Earning Report of General Electric
Q3 2009 Earning Report of General ElectricQ3 2009 Earning Report of General Electric
Q3 2009 Earning Report of General Electric
earningreport earningreport
 
Presentation on Q1 2009 Earning Report of Key Corp
Presentation on Q1 2009 Earning Report of Key CorpPresentation on Q1 2009 Earning Report of Key Corp
Presentation on Q1 2009 Earning Report of Key Corp
earningreport earningreport
 
Q1 2009 Earning Report of Kimberly Clark Corp.
Q1 2009 Earning Report of Kimberly Clark Corp.Q1 2009 Earning Report of Kimberly Clark Corp.
Q1 2009 Earning Report of Kimberly Clark Corp.
earningreport earningreport
 
Q1 2009 Earning Report of Duke Realty Corp.
Q1 2009 Earning Report of Duke Realty Corp.Q1 2009 Earning Report of Duke Realty Corp.
Q1 2009 Earning Report of Duke Realty Corp.
earningreport earningreport
 
Q3 2009 Earning Report of RPM International Inc.
Q3 2009 Earning Report of RPM International Inc.Q3 2009 Earning Report of RPM International Inc.
Q3 2009 Earning Report of RPM International Inc.
earningreport earningreport
 
Q3 Earning report of Daimler AG
Q3 Earning report of Daimler AGQ3 Earning report of Daimler AG
Q3 Earning report of Daimler AG
earningreport earningreport
 
Technology and TV
Technology and TVTechnology and TV
Technology and TV
Peter Wood
 
Ad

Similar to Windows Mobile 5.0 Data Access And Storage Webcast (20)

ADO.Net Improvements in .Net 2.0
ADO.Net Improvements in .Net 2.0ADO.Net Improvements in .Net 2.0
ADO.Net Improvements in .Net 2.0
David Truxall
 
Cis266 final review
Cis266 final reviewCis266 final review
Cis266 final review
Randy Riness @ South Puget Sound Community College
 
the .NET Framework. It provides the claf
the .NET Framework. It provides the clafthe .NET Framework. It provides the claf
the .NET Framework. It provides the claf
TesfahunMaru1
 
Mobile
MobileMobile
Mobile
firstmedit
 
SQL Server 2008 for Developers
SQL Server 2008 for DevelopersSQL Server 2008 for Developers
SQL Server 2008 for Developers
ukdpe
 
Windows Azure and a little SQL Data Services
Windows Azure and a little SQL Data ServicesWindows Azure and a little SQL Data Services
Windows Azure and a little SQL Data Services
ukdpe
 
Ado.Net Architecture
Ado.Net ArchitectureAdo.Net Architecture
Ado.Net Architecture
Umar Farooq
 
SQLite in Adobe AIR
SQLite in Adobe AIRSQLite in Adobe AIR
SQLite in Adobe AIR
Peter Elst
 
Saying goodbye to SQL Server 2000
Saying goodbye to SQL Server 2000Saying goodbye to SQL Server 2000
Saying goodbye to SQL Server 2000
ukdpe
 
Novidades do SQL Server 2016
Novidades do SQL Server 2016Novidades do SQL Server 2016
Novidades do SQL Server 2016
Marcos Freccia
 
Database Connectivity using Python and MySQL
Database Connectivity using Python and MySQLDatabase Connectivity using Python and MySQL
Database Connectivity using Python and MySQL
devsuchaye
 
Change tracking
Change trackingChange tracking
Change tracking
Sonny56
 
Lecture13
Lecture13Lecture13
Lecture13
Châu Thanh Chương
 
Ado
AdoAdo
Ado
abhay singh
 
Visual Studio 2005 Database Professional Edition
Visual Studio 2005 Database Professional EditionVisual Studio 2005 Database Professional Edition
Visual Studio 2005 Database Professional Edition
David Truxall
 
Chapter 4 event it theory programming.pptx
Chapter 4 event it theory programming.pptxChapter 4 event it theory programming.pptx
Chapter 4 event it theory programming.pptx
kmkkali41
 
SQL Server 2019 CTP 2.5
SQL Server 2019 CTP 2.5SQL Server 2019 CTP 2.5
SQL Server 2019 CTP 2.5
Gianluca Hotz
 
Practical OData
Practical ODataPractical OData
Practical OData
Vagif Abilov
 
76.pptx ajx ppt file for univercity of granted
76.pptx ajx ppt file for univercity of granted76.pptx ajx ppt file for univercity of granted
76.pptx ajx ppt file for univercity of granted
hectortrading693
 
AWS RDS Migration Tool
AWS RDS Migration Tool AWS RDS Migration Tool
AWS RDS Migration Tool
Blazeclan Technologies Private Limited
 
ADO.Net Improvements in .Net 2.0
ADO.Net Improvements in .Net 2.0ADO.Net Improvements in .Net 2.0
ADO.Net Improvements in .Net 2.0
David Truxall
 
the .NET Framework. It provides the claf
the .NET Framework. It provides the clafthe .NET Framework. It provides the claf
the .NET Framework. It provides the claf
TesfahunMaru1
 
SQL Server 2008 for Developers
SQL Server 2008 for DevelopersSQL Server 2008 for Developers
SQL Server 2008 for Developers
ukdpe
 
Windows Azure and a little SQL Data Services
Windows Azure and a little SQL Data ServicesWindows Azure and a little SQL Data Services
Windows Azure and a little SQL Data Services
ukdpe
 
Ado.Net Architecture
Ado.Net ArchitectureAdo.Net Architecture
Ado.Net Architecture
Umar Farooq
 
SQLite in Adobe AIR
SQLite in Adobe AIRSQLite in Adobe AIR
SQLite in Adobe AIR
Peter Elst
 
Saying goodbye to SQL Server 2000
Saying goodbye to SQL Server 2000Saying goodbye to SQL Server 2000
Saying goodbye to SQL Server 2000
ukdpe
 
Novidades do SQL Server 2016
Novidades do SQL Server 2016Novidades do SQL Server 2016
Novidades do SQL Server 2016
Marcos Freccia
 
Database Connectivity using Python and MySQL
Database Connectivity using Python and MySQLDatabase Connectivity using Python and MySQL
Database Connectivity using Python and MySQL
devsuchaye
 
Change tracking
Change trackingChange tracking
Change tracking
Sonny56
 
Visual Studio 2005 Database Professional Edition
Visual Studio 2005 Database Professional EditionVisual Studio 2005 Database Professional Edition
Visual Studio 2005 Database Professional Edition
David Truxall
 
Chapter 4 event it theory programming.pptx
Chapter 4 event it theory programming.pptxChapter 4 event it theory programming.pptx
Chapter 4 event it theory programming.pptx
kmkkali41
 
SQL Server 2019 CTP 2.5
SQL Server 2019 CTP 2.5SQL Server 2019 CTP 2.5
SQL Server 2019 CTP 2.5
Gianluca Hotz
 
76.pptx ajx ppt file for univercity of granted
76.pptx ajx ppt file for univercity of granted76.pptx ajx ppt file for univercity of granted
76.pptx ajx ppt file for univercity of granted
hectortrading693
 
Ad

More from Vinod Kumar (7)

Backup beyond just a strategy with SQL Server
Backup beyond just a strategy with SQL ServerBackup beyond just a strategy with SQL Server
Backup beyond just a strategy with SQL Server
Vinod Kumar
 
SQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query PerformanceSQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query Performance
Vinod Kumar
 
Advanced t sql - querying and programming inside sql server
Advanced t sql - querying and programming inside sql serverAdvanced t sql - querying and programming inside sql server
Advanced t sql - querying and programming inside sql server
Vinod Kumar
 
Choosing a concurrency model, optimistic or pessimistic
Choosing a concurrency model, optimistic or pessimisticChoosing a concurrency model, optimistic or pessimistic
Choosing a concurrency model, optimistic or pessimistic
Vinod Kumar
 
Choosing A Concurrency Model, Optimistic Or Pessimistic
Choosing A Concurrency Model, Optimistic Or PessimisticChoosing A Concurrency Model, Optimistic Or Pessimistic
Choosing A Concurrency Model, Optimistic Or Pessimistic
Vinod Kumar
 
Sql Server Security
Sql Server SecuritySql Server Security
Sql Server Security
Vinod Kumar
 
Protecting Your Key Asset – Data Protection Best Practices V2.0 Final
Protecting Your Key Asset – Data Protection Best Practices V2.0   FinalProtecting Your Key Asset – Data Protection Best Practices V2.0   Final
Protecting Your Key Asset – Data Protection Best Practices V2.0 Final
Vinod Kumar
 
Backup beyond just a strategy with SQL Server
Backup beyond just a strategy with SQL ServerBackup beyond just a strategy with SQL Server
Backup beyond just a strategy with SQL Server
Vinod Kumar
 
SQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query PerformanceSQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query Performance
Vinod Kumar
 
Advanced t sql - querying and programming inside sql server
Advanced t sql - querying and programming inside sql serverAdvanced t sql - querying and programming inside sql server
Advanced t sql - querying and programming inside sql server
Vinod Kumar
 
Choosing a concurrency model, optimistic or pessimistic
Choosing a concurrency model, optimistic or pessimisticChoosing a concurrency model, optimistic or pessimistic
Choosing a concurrency model, optimistic or pessimistic
Vinod Kumar
 
Choosing A Concurrency Model, Optimistic Or Pessimistic
Choosing A Concurrency Model, Optimistic Or PessimisticChoosing A Concurrency Model, Optimistic Or Pessimistic
Choosing A Concurrency Model, Optimistic Or Pessimistic
Vinod Kumar
 
Sql Server Security
Sql Server SecuritySql Server Security
Sql Server Security
Vinod Kumar
 
Protecting Your Key Asset – Data Protection Best Practices V2.0 Final
Protecting Your Key Asset – Data Protection Best Practices V2.0   FinalProtecting Your Key Asset – Data Protection Best Practices V2.0   Final
Protecting Your Key Asset – Data Protection Best Practices V2.0 Final
Vinod Kumar
 

Recently uploaded (20)

AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 

Windows Mobile 5.0 Data Access And Storage Webcast

  • 1. Windows Mobile: Data Access and Storage Vinod Kumar M Technology Evangelist Microsoft India http://blogs.sqlxml.org/vinodkumar http://www.ExtremeExperts.com
  • 2. Where We’re Going today What’s New In… Changes in SQL Mobile Direct Data Management Connectivity and Data Transfer Tools and Productivity Enhancements
  • 3. Changes in SQL Mobile
  • 4. Changes in SQL Mobile Key new features Multi-user Support Can now access the same database from multiple programs simultaneously Improved Query Processor More optimized No longer necessary to Compact to update statistics
  • 5. Changes in SQL Mobile Desktop Support SQL Mobile now available on the Desktop Databases can now be created on the desktop Can now transfer a database using ActiveSync (no server engine required) Can now administer database from desktop
  • 6. Changes in SQL Mobile Smartphone Smartphone now supports SQL Mobile Full featured support Create, Query, Transactions… Databinding DataGrid
  • 8. Direct Data Management SqlCeResultset Updatable scrolling SQL Mobile cursor Dataset Improved parity with full .NET Framework Easier to synchronize changes to/from full .NET Framework XML XML Serialization XPath Support XML Schema
  • 9. SqlCeResultSet SqlCeResultSet Provides direct connectivity to the SQL Server Mobile Edition database Supports forward and backward scrolling Supports updates Supports databinding
  • 10. SqlCeResultSet Features vs. Performance Features comparable to DataSet commonly used features Scrolling Updatability Databinding Performance similar to SqlCeDataReader Direct db access No in-memory data duplication
  • 11. SqlCeResultSet Compatability with SqlCeDataReader Inherits from SqlCeDataReader Provides strongly typed getters GetInt32(), GetString(), etc. Provides SqlCeDataReader forward Read() method Fully compatible with existing SqlCeDataReader code you may have
  • 12. SqlCeResultSet Usage Created from SqlCeCommand ExecuteResultSet method Specific behavior controlled by ResultSetOptions enumeration
  • 13. SqlCeResultSet Usage (continued) string sql = "Select ProductId, Desc, Qty, UnitPrice"; SqlCeConnection conn = new SqlCeConnection(@"Data Source = \Orders.sdf"); SqlCeCommand commmand = new SqlCeCommand(sql, conn); SqlCeResultSet rs = commmand.ExecuteResultSet(ResultSetOptions.None); while (rs.Read()) { // retrieve column values from the current record }
  • 14. SqlCeResultSet Updatability Full Support for updatability Use ResultSetOptions.Updatable when executing the command Use strongly typed Setters to modify columns SetInt32, SetString Call Update method to save record changes to the database
  • 15. SqlCeResultSet Updatability(continued) SqlCeResultSet rs = commmand.ExecuteResultSet(ResultSetOptions.Updatable); int idxProductId = rs.GetOrdinal("ProductId"); int idxDesc = rs.GetOrdinal("Desc"); int idxUnitPrice = rs.GetOrdinal("UnitPrice"); while (rs.Read()) { // Retrieve current values string productId = rs.GetString(idxProductId); string desc = rs.GetString(idxDesc); double unitPrice = rs.GetDouble(idxUnitPrice); // Prepend Product ID to the description rs.SetString(idxDesc, productId + " - " + desc); // Increase the price by 10% rs.SetDouble(idxUnitPrice, unitPrice * 1.1); // Apply record changes to db rs.Update(); }
  • 16. SqlCeResultSet Scrolling Access Supports scrolling and direct record access Use ResultSetOptions.Scrollable when executing the command Provides Readxxx commands ReadFirsts, ReadLast Read, ReadPrevious ReadAbsolute ReadRelative
  • 17. SqlCeResultSet Scrolling Access (continued) SqlCeResultSet rs = commmand.ExecuteResultSet(ResultSetOptions.Scrollable | ResultSetOptions.Updatable ); // Read entire result backwards rs.ReadLast(); while(rs.ReadPrevious(); { // ... } // Absolute positioning rs.ReadAbsolute(10); // Read 10 records from beginning rs.ReadAbsolute(-10); // Read 10 records from end // Relative positioning rs.ReadRelative(5); // Read forward 5 records rs.ReadRelative(-5); // Read backward 5 records
  • 18. SqlCeResultSet Databinding Create result set as normal All ResultSetOptions allowable Should include ResultSetOptions.Scrollable Bind to the ResultSetView property of the result set Provides same interfaces as DataView ITypedList, IBindingList, IList, ICollection, IEnumerable, IDisposable Can be used with any bindable controls
  • 19. SqlCeResultSet Databinding (continued) SqlCeResultSet rs = commmand.ExecuteResultSet(ResultSetOptions.Scrollable); listBox1.DataSource = rs.ResultSetView; listBox1.DisplayMember = "Desc"; listBox1.ValueMember = "ProductId"; textBox1.DataBindings.Add("Text", rs, "UnitPrice");
  • 20. DataSet Several new methods added New methods improve parity with desktop New methods make synchronizing changes much easier
  • 21. DataSet New Features/Methods Serialization methods now supported on a single table DataSet.Copy method DataSet.GetChanges method DataSet.Merge
  • 22. DataSet DataTable Serialization An individual data table can now be saved and restored WriteXml ReadXml An individual data table can now be sent or received as a web service argument Simply pass as an argument
  • 23. DataSet DataTable Serialization private void DeptComplete(string deptName, DataSet ds) { DataTable dt = ds.Tables["DeptDetail"]; dt.WriteXml(deptName + ".xml"); dt.Clear(); } private void DeptRestore(string deptName, DataSet ds) { DataTable dt = ds.Tables["DeptDetail"]; dt.Clear(); dt.ReadXml(deptName + ".xml"); }
  • 24. DataSet Copy Method Copy creates an exact duplicate Copy includes both data and schema Useful for transferring a snapshot Snapshot can be sent in background Application can still continue to function and modify original DataSet
  • 25. DataSet Copy Method (continued) [WebMethod] public void SaveSnapshot(DataSet ds) { WriteDataSetToDatabase(ds); } private void Upload(DataSet ds) { DataServerProxy wsProxy = new DataServerProxy(); wsProxy.SaveSnapshot(ds); } Target Web Service Device call – Too slow, user must wait for whole upload
  • 26. DataSet Copy Method (continued) private void Upload(DataSet ds) { DataServerProxy wsProxy = new DataServerProxy(); wsProxy.BeginSaveSnapshot(ds, null, null); } private void Upload(DataSet ds) { DataServerProxy wsProxy = new DataServerProxy(); DataSet dsDupe = ds.Copy(); wsProxy.BeginSaveSnapshot(dsDupe, null, null); } Device call – Changes to data during upload will corrupt upload Device call – Send copy in background, this is safe
  • 27. DataSet Getting changes GetChanges method Retrieves changes since DataSet was loaded or AcceptChanges was called Changes returned as a DataSet The returned DataSet will generally be much smaller then original DataSet Returned DataSet is optimized for merging
  • 28. DataSet Merging Changes Merge method Merges a DataSet into the current DataSet Data is matched up based on primary key Additions, deletions, modifications in the source DataSet are applied to the target
  • 29. DataSet Retrieving Changes from server [WebMethod] public DataSet GetLatest(DateTime startingDate) { return RetrieveChangesFromDatabase(startingDate); } private void GetUpdates(DataSet currentDs, DateTime lastUpdate) { DataServerProxy wsProxy = new DataServerProxy(); DataSet changeDs = wsProxy.GetLatest(lastUpdate); currentDs.Merge(changeDs); } Web method on server Call to web method from device
  • 30. DataSet Sending Changes to the server [WebMethod] public void StoreUpdates(DataSet changeDs) { ApplyChangesToDataBase(changeDs); } private void SendChanges(DataSet currentDs) { DataServerProxy wsProxy = new DataServerProxy(); DataSet changeDs = currentDs.GetChanges(); wsProxy.StoreUpdates(changeDs); } Web method on server Call to web method from device
  • 31. XML Support Added more XML features Greater parity with the full framework XML Serialization XPath XML Schema
  • 32. XML Serializer Classes can now be serialize/deserialized XmlSerializer class is the engine Serialize saves class instance as XML Deserialize restores the class instance Serialization Control Class must have default constructor Attributes can control details XmlElement XmlAttribute
  • 33. XPath XPath now supported by XmlDocument Rich support for XPath queries Notably simplifies XML processing Methods SelectNode Returns a single matching node SelectNodes Returns list of matching nodes
  • 34. XmlSchema XmlSchema provides XML validation engine Eliminates the need to validate explicitly in code Useful for verifying that a document appears as expected Useful for verifying content to legacy web services Can programmatically construct schemas
  • 36. Connectivity and Data Transfer Detecting changes in connectivity Your application can now respond to changes in connectivity!! Your application can the know type of connectivity (GPRS, Modem, ActiveSync…) MSMQ Reliable message delivery Automatically handles connectivity
  • 37. Connectivity Detecting changes in connectivity Device connectivity is inconsistent Connectivity comes and goes Type of connectivity may vary during application lifetime GPRS Modem ActiveSync WiFi Applications must behave gracefully in the face of these changes
  • 38. Tools and Productivity Enhancements
  • 39. Tools and Productivity Enhancements Visual Studio for Devices Manage device databases from your desktop!! Copy SQL Mobile databases between your desktop and device Generating typed Datasets
  • 40. Create and Manage Can now administer database from the desktop Create new database Add tables Define columns and indexes
  • 44. Typed DataSets .NET CF now supports typed DataSets Provides strongly typed table structure Strongly typed properties of the column getters
  • 45. Summary Great enhancement to SQL Mobile SqlCeResultSet provides updatable, scrollable cursor DataSet provides new methods to make sync easier Rich XML support Can easily detect connectivity Tools make device DB development as easy as server-based DB’s
  • 46. For The Contest Questions and The Feedback Form, please log on to: http://www.microsoft.com/India/ webcasts/eval/jan170430
  • 47. © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.