.net Compact Edition 2.0,SQL Server Compact Edition和复制

时间:2022-05-02 09:00:28

I have been tasked with creating a mobile application for a Windows 6.0 CE device which is running .NET 2.0.7045.0 Compact Framework.

我的任务是为运行.NET 2.0.7045.0 Compact Framework的Windows 6.0 CE设备创建移动应用程序。

I have SQL Server 2005 Express running on my local machine and I want to let the Mobile Application have a replication or snapshot of my database, so the users can update the data in the field. Once they return they can sync back up with the device and update the Database with the updated data.

我在我的本地计算机上运行SQL Server 2005 Express,并且我想让Mobile Application具有我的数据库的复制或快照,因此用户可以更新该字段中的数据。一旦他们返回,他们可以与设备同步备份并使用更新的数据更新数据库。

I have zero experience with this, so any help would be appreciated.

我没有这方面的经验,所以任何帮助将不胜感激。

I have managed to get my IDE (Visual Studio 2008 Pro) talking to it and I can run my Applications and debug on it.

我已经设法让我的IDE(Visual Studio 2008 Pro)与它交谈,我可以运行我的应用程序并对其进行调试。

I assume once the device has been attached to it, it can connect to the computer ipaddress\instance or something?

我假设一旦设备连接到它,它可以连接到计算机ipaddress \ instance或什么?

Does this sound like the correct way to do it?

这听起来像是正确的方法吗?

Cheers, Sarkie

3 个解决方案

#1


Yes, that sounds right. Your PDA will have an IP address assigned to its ActiveSync connection, and so will your PC (have a look under Network Connections, there should be a Windows Mobile Adapter there and you can look up the PCs IP address there). That is assuming it uses ActiveSync, but you do mention Windows CE, so maybe you connect it in a different way?

是的,这听起来是对的。您的PDA将为其ActiveSync连接分配IP地址,您的PC也是如此(在网络连接下查看,那里应该有一个Windows Mobile适配器,您可以在那里查找PC的IP地址)。假设它使用ActiveSync,但你确实提到了Windows CE,所以也许你以不同的方式连接它?

I assume you already know how to get the database replication going? If not, here's an article to guide you in the right direction.

我假设您已经知道如何进行数据库复制?如果没有,这是一篇指导您正确方向的文章。

#2


You may want to look at using RDA (Remote Data Access) - which is well supported by SQL Server Express - instead of Merge-Replication to achieve what you need. While Merge-Replication is more flexible, it requires making changes to the host database. RDA is easier to use and only requires a basic setup and DLL to be added to SQL Server.

您可能希望使用RDA(远程数据访问) - SQL Server Express得到很好的支持 - 而不是Merge-Replication来实现您的需求。虽然Merge-Replication更灵活,但它需要对主机数据库进行更改。 RDA更易于使用,只需要将基本设置和DLL添加到SQL Server。

See Microsoft's information on that.

请参阅Microsoft的相关信息。

#3


try Microsoft Sync Framework its cool and fast way.

尝试Microsoft Sync Framework的酷炫快捷方式。

#1


Yes, that sounds right. Your PDA will have an IP address assigned to its ActiveSync connection, and so will your PC (have a look under Network Connections, there should be a Windows Mobile Adapter there and you can look up the PCs IP address there). That is assuming it uses ActiveSync, but you do mention Windows CE, so maybe you connect it in a different way?

是的,这听起来是对的。您的PDA将为其ActiveSync连接分配IP地址,您的PC也是如此(在网络连接下查看,那里应该有一个Windows Mobile适配器,您可以在那里查找PC的IP地址)。假设它使用ActiveSync,但你确实提到了Windows CE,所以也许你以不同的方式连接它?

I assume you already know how to get the database replication going? If not, here's an article to guide you in the right direction.

我假设您已经知道如何进行数据库复制?如果没有,这是一篇指导您正确方向的文章。

#2


You may want to look at using RDA (Remote Data Access) - which is well supported by SQL Server Express - instead of Merge-Replication to achieve what you need. While Merge-Replication is more flexible, it requires making changes to the host database. RDA is easier to use and only requires a basic setup and DLL to be added to SQL Server.

您可能希望使用RDA(远程数据访问) - SQL Server Express得到很好的支持 - 而不是Merge-Replication来实现您的需求。虽然Merge-Replication更灵活,但它需要对主机数据库进行更改。 RDA更易于使用,只需要将基本设置和DLL添加到SQL Server。

See Microsoft's information on that.

请参阅Microsoft的相关信息。

#3


try Microsoft Sync Framework its cool and fast way.

尝试Microsoft Sync Framework的酷炫快捷方式。