Windows Mobile 6.5 C#应用程序的最佳EDB

时间:2012-08-01 11:33:24

标签: c# windows-mobile

我想在C#中为现有的Windows移动应用创建EDB。我找到了一些解决方案,如:

  • DbfDotNet我在这个项目中找到了一个关于问题的协调员帖子。 (http://dbfdotnet.codeplex.com/discussions/283054)

  • .NET和SQL Anywhere 10

  • 来自MSDN http://msdn.microsoft.com/en-us/library/aa912256的EDB - 但它是在C ++,我不知道如何在c#中使用它

  • SQL Server CE - 但“最新版本是支持.NET Framework 4.0的SQL Server Compact 4.0 [1],并在此版本中删除了对Windows Mobile的支持。”

请您给我建议并分享您的经验?我很感激。

1 个答案:

答案 0 :(得分:0)

我之前尝试过这条路线,但是我没有找到一个切割干燥的解决方案。

所以,我有一个项目,我开始,但放弃了,而不是要求我的设备直接与SQL Server进行通信。

如果您无法直接与服务器通信,那么您的某个数据库(设备上的本地数据库或主服务器上的中心数据库)将需要一个字段来表示某种形式的日期邮票和您的设备需要跟踪此日期戳。

DateTime dateStamp; // on Windows Mobile

private void MockUp() {
  ReadDataFromServer();
  dateStamp = ReadDateFromServer();
  DoStuffInYourProgram();
  UpdateAnythingNewerThan(dateStamp);
}

private void ReadDataFromServer() {
  // read data from your central server
  // and store that data into a DataSet or DataTable
}

private DateTime ReadDateFromServer() {
  // this would be better in the ReadDataFromServer() method,
  // but it is shown here for clarity
}

private void DoStuffInYourProgram() {
  // This isn't a real routine, but rather what you are going
  // to have your device doing
}

private void UpdateAnythingNewerThan(DateTime value) {
  // read records from your server that are newer than the value
  // passed in, then update those values with the new data your
  // device has collected.
}

我希望我可以不那么模糊,但这应该给你一般的想法。