使用silverlight 5读取本地MDB(Access)数据库?
我试图找到从本地 MDB 文件读取的方法。要求用户可以拥有自己的访问数据库。我的 silverlight 应用程序将与该数据进行交互并执行计算。 我有什么办法可以使用它吗?我发现 ADO.net 没有随 Silverlight 5 一起提供。 到目前为止我看到的所有示例都假设 silverlight 客户端和数据库之间存在 Wcf 服务。
I am tring to find someway to read from local MDB file. It is a requirement that user may have their own access database. And my silverlight app would be interacting and performing calculations on that data.
Is there any way I can work with it? I have found that ADO.net doesn't come with Silverlight 5.
All the examples I have seen so far, are assuming that there is Wcf service between silverlight client and database.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可以为您看到两个选项:
1)使用打开文件对话框让用户选择文件,以便您可以将其复制到独立存储,然后对其进行处理,并让用户在完成后将文件保存到磁盘。
2) 让用户从浏览器中安装您的 Silverlight 应用程序,这将使您能够访问文件系统并自由读取 MDB。 http://msdn.microsoft.com/en- us/library/dd550721(VS.96).aspx#special_features_for_outofbrowser_applications
就我个人而言更喜欢第二种选择。
我假设您正在使用 ADO.Net 来读取数据库,因此您需要确保安装了正确的提供的数据库。
祝你好运
I can see two options for you:
1) Using the open file dialog get the user to select the file so you can copy it to the Isolated Storage then work on it and get the user to save the file to disk once you have done.
2) Get the user to install you Silverlight application out of brower, this will give you access to the file system and freedom to read the MDB. http://msdn.microsoft.com/en-us/library/dd550721(VS.96).aspx#special_features_for_outofbrowser_applications
Personally i prefer the second option.
I'm assuming you are using ADO.Net to read the database, so you'll need to ensure that the correct provided is installed.
good luck