DEVBUZZ Homepage Configuring Remote Data Access
 
Web www.devbuzz.com
  HOME PAGE
  All Articles
  Advertise
  Consulting

 Development
  Discuss - Forums
  Still in the box?
  .Compact Framework
  Code Snippets
  SQL Server CE
  Database
  MS Resources
 Stores
  Developer Controls
  Pocket PC Hardware
  Pocket PC Software
  Pocket PC Books
  .NET CF Books
  Book Reviews
  SPB SW Discounts
  RESCO SW Discounts
 DEVBUZZ Info
  About Us
  Help
  Join our email list
  Links & Ratings
  Press & Comments
  Pocket PC version
  Software Reviews
  Hardware Reviews
 Authors
  Authors
  Article Guide
  Competitions
 Resources
  Developers
  Register
  Login

  SPB Discounts!
 Columnists
  Rick Winscot
 Past Blast
  Personal Media Ctr
  Gizmobility
  eVB Legacy
  Old news
  Hosted Software
  Wireless
  Newsletters
  Carl Davis
  Upton Au

 Pocket PC Registry
  Join the registry
  View current list
 Current Poll
Are you converting to .NET Compact Framework?
Yes, it has changed my life!
No, I'm sticking with eVB
.NET CF what's that`?

Current results
3431 votes so far
 Recent Forum Threads [goto forums]

Get Computername
read... (67 hits)


Great aid to development productivity
read... (82 hits)


ThreadingTimer sample code
read... (143 hits)


Multithreading with .NET CF
read... (194 hits)


Moving from eMbedded Visual Basic to Visual Basic .NET
read... (166 hits)


.NET Compact Framework 2.0 Service Pack 2
read... (226 hits)


Transfer Data from SQL Server 2000 to SQL Server Compact Edition
read... (298 hits)


This protocol version is not supported
read... (236 hits)


Converting Lowercase to uppercase wont work
read... (203 hits)


Direct access to MS SQL Server 2000
read... (374 hits)


Creating SDF file in Desktop
read... (513 hits)


Winsock in CF.NET
read... (316 hits)


Using Pocket Outlook to submit HTML page form with MAILTO action
read... (420 hits)


Missing file "System.Data.PocketPC.asmmeta.dll"
read... (268 hits)


HP iPAQ hw6915 Serial Port Issue
read... (309 hits)


Info on the recent forum changes
read... (341 hits)


SqlServer tools from Redgate
read... (383 hits)


Arrow keys and Hardware navigation button
read... (393 hits)


O2 XDA lls pin sync cable to comport
read... (322 hits)


Creating dynamic folders on Pocket PC OS
read... (299 hits)

Custom Windows Mobile software development.
LBS Challenge 2007
LBS Challenge Eight previous NAVTEQ Global LBS Challenge® participants have received venture capital funding and nine past LBS Challenge winners have launched commercial applications on major wireless carriers. Register your non-commercial LBS application in the 2007 NAVTEQ Global LBS Challenge in one of three regions: Americas, Europe-Middle East-Africa (EMEA) or Asia-Pacific(APAC). You could win a share of $2 million in prizes. This could be your year.
Dream. Develop. Win.

EyeCandy by Rick Winscott | Back

Configuring Remote Data Access
Written by Rick Winscot  [author's bio]  [read 81665 times]
Edited by Derek

Download the code   Discuss this article   SQL Server CE 1.1   

Page 1  Page 2 

Click here for a Flash overview of RDA Push and Pull

If you haven't had any experience yet with SQL Server CE, I am sure you will be hooked before you complete your first application. It is an incredible solution for mobile database needs, which offers real performance and scalability.

So...

If YouAreAdvancedUser=True Then
  Skip Introduction
Else
  Read Introduction

Introduction

SQL Server CE provides two methods for SQL Server (desktop) data access.

The first is Replication.

"Merge replication in SQL Server CE is based on Microsoft SQL Server 2000 merge replication and is ideally suited to portable devices because it enables data to be updated independently on the portable device and the server. The data on the device and the server can later be synchronized when the device is connected to the server."
-Microsoft Books Online

One would use replication when the solution requires that any data modification must be maintained on both the handheld and desktop - such as an inventory tracking system.

The second method, is Remote Data Access (RDA).

"Remote data access (RDA) provides a simple way for a Windows CE application to access SQL Server data located in a remote SQL Server 6.5, SQL Server 7.0, or SQL Server 2000 database. RDA can be used whether the Windows CE device is continuously connected or intermittently connected to the SQL Server system. Applications use RDA when they do not need the full functionally of merge replication. You can use RDA without configuring SQL Server replication or creating publications."
-Microsoft Books Online

That is not to say that RDA is a 'poor relative' of Merge Replication. RDA is a great tool to use when only portions of a database need to be transferred to the handheld, and/or a constant sync state is not a priority.

As an example: School administrators want to be able to carry student demographic and emergency contact information around with them - on their handhelds. The data needs to be current, but they wouldn't be making any changes to the records. In this case, Merge Replication wouldn't be necessary - and a simple RDA 'pull' gets the job done. If RDA is all you need, this article is for you.

How it is Done

Remote Data Access on CE handhelds is implemented by a few dll's, a relay agent, IIS and SQL Server. Each piece has its own job, and putting them together can present an issue if you aren't familiar with how they work together. Take a look at this flash animation to see how all the pieces work together.

This Project

You should be able to get this project put together in about an hour following these ten steps. Remember that configuration is everything! If any of your settings are incorrect your project won't work - and it will be difficult to pinpoint the problem. Error messages (if you manage to get one) are usually very vague and may only be the symptom of an earlier error. I have included a list of my top five blunders for your benefit.

I would like to thank TechSmith, makers of Camtasia for making this article possible. I used Camtasia to record movie clips that detail each configuration step - which I hope will guide you through the development process, and help you avoid common mistakes. I highly recommend it for anyone that needs to put instructional presentations together. It's easy to use, and very inexpensive.

All you need is TechSmith's Video Codec for Windows Media Player.

This project was constructed with eVB 3.0, Windows 2000, SQL Server 2000, SQL Server CE, SQL Server CE Relay, Active Sync 3.1, IIS and uses an Anonymous authentication method. Please make sure you have all these items before you start.

Next Page 

Back to the EyeCandy | [Article Index]

 

Back to the top of the page.
Chris De Herrera's Windows CE Website Windows CE News & Information Source
Copyright ©2000-2007 by DEVBUZZ.COM, Inc., NJ. USA.MSDEVELOP