如何获得数据库中的许可 [英] How to get permission in data bases

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

问题描述

您好,我在读取文件列表时遇到问题.我想如何获得在/data/data/yourapplication包/数据库中打开文件的权限

Hi, I am facing a problem in reading file list.I want to how to get permission to open file inside " /data/data/yourapplication package/databases

推荐答案

您无法使用应用程序或File API访问/data/内部的文件.

根据您的要求,您不需要数据库路径即可访问它.只需创建SqliteDatabaseHelper类,该类将自动从/​​data/data/yourapplication包/数据库中查找数据库.那不会要求您传递数据库路径.默认情况下,该助手将在创建新数据库时将其存储在资源文件夹中.
You cannot access the file inside of /data/ using your application or File API.

As per your requirement you don''t need the path of database to access it. Just create the SqliteDatabaseHelper class that will automatically find the database from /data/data/yourapplication package/databases. That will not ask you to pass the path of database. That helper will store the database at your resourse folder by default when it creates new.


谢谢.我尝试了一下,现在可以正常工作了. :-)
Thank you. I tried it and now its workin fine. :-)


这篇关于如何获得数据库中的许可的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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