获取本地数据库大小 [英] Get Local Database Size

查看:99
本文介绍了获取本地数据库大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个内部商务电话应用程序,它使用通过网络同步的本地数据库用户返回办公室时的服务器调用。这样做是为了避免高额数据费用。
  创建DataContext时,我使用了以下  参数:
  " Data Source = isostore:/Claims.sdf;最大数据库大小= 512;" 。该应用程序工作正常,我没有数据问题,但有些用户经常
达到最大数据库大小512.我想警告他们,当他们接近这个限制,但找不到任何调用,以获得当前大小的数据库。有谁知道如何做到这一点?

解决方案

没有办法直接这样做:但是我确实找到了StackOverflow上的链接,它包含您可以使用的示例代码。如果这有帮助,请告诉我。


http://stackoverflow.com/questions/12998953/windows-phone-isolatedstorage-get-directory-size


I have written an internal business phone app which uses a local database which is synced via web server calls when the user returns to the office. This is done to avoid high data charges.  When creating the DataContext I used the following  parameter:  "Data Source=isostore:/Claims.sdf; Max Database Size = 512;". The application works fine and I have no problems with the data, however some users often reach the max database size of 512. I want to warn them when they are approaching this limit but cannot find any calls to get the current size of the database. Does anyone know how to do this?

解决方案

There is no way to do this directly: However I did find a link on StackOverflow that has sample code you can use. Let me know if this helps at all.

http://stackoverflow.com/questions/12998953/windows-phone-isolatedstorage-get-directory-size


这篇关于获取本地数据库大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆