ios andior pc使用数据库的存储路径
来源:互联网 发布:linux free m 详解 编辑:程序博客网 时间:2024/06/07 07:08
ios 和pc 端一样有mono 和sqplite.dll
andior例外
publicvoidOpenConnectSqlite(stringdataBaseName) {
//获取数据库的名称
stringconDataBaseName = dataBaseName;
//判断是否为数据库后缀
if(!conDataBaseName .Contains (".sqlite"))
{
//帮忙加上后缀
conDataBaseName +=".sqlite";
}
//连接本地数据库
#ifUNITY_EDITOR
dataPath ="Data Source ="+Application.streamingAssetsPath +"/"+ conDataBaseName;
#elifUNITY_ANDROID
string dataPath = "URI = file:" + Application.persistentDataPath + "/"+ conDataBaseName;
string androidPath = "jar:file://" + Application.dataPath + "!/assets/"+ conDataBaseName;
string androidFilePath = Application.persistentDataPath + "/"+ conDataBaseName;
if (!File.Exists(androidFilePath))
{
WWW www = new WWW(androidPath);
while (!www.isDone)
{
}
File.WriteAllBytes(androidFilePath, www.bytes);
}
#elifUNITY_IPHONE
dataPath="Data Source ="+ Application.dataPath + "/Raw" + "/"+ conDataBaseName;
#endif
con =newSqliteConnection(dataPath);
command = con.CreateCommand();
//试图打开数据库
try
{
con.Open();
}
catch(SqliteExceptionex)
{
Debug.Log(ex);
}
}
阅读全文
0 0
- ios andior pc使用数据库的存储路径
- Unity下安卓,Ios,PC平台下的路径读取
- ios 模拟器中应用程序的存储路径
- iOS 沙盒路径详解(存储路径的选择)
- MySQL 5.7版本的安装使用详细教程+更改数据库data的存储路径
- iOS数据存储路径
- 指定数据库存储路径
- 修改数据库存储路径
- Android使用sqlliteOpenhelper更改数据库的存储路径放到SD卡上
- Android使用sqlliteOpenhelper更改数据库的存储路径放到SD卡上
- Android使用sqlliteOpenhelper更改数据库的存储路径放到SD卡上
- Android使用sqlliteOpenhelper更改数据库的存储路径放到SD卡上
- Android使用sqlliteOpenhelper更改数据库的存储路径放到SD卡上
- android中存储路径的使用
- 使用路径API获取获取内部存储目录的路径
- 使用API获取内部存储文件的路径;外部存储
- 更改MySQL数据库存储路径
- mysql 调整数据库存储路径
- H3C路由器配置
- MyBatis框架环境搭建以及配置
- ubuntu停止httpd服务
- 项目中遇到的单词.句子.积累
- apahce2.2 http https ssl/tls 加…
- ios andior pc使用数据库的存储路径
- BGP3
- linux的文件打包与压缩
- Multicast-1
- 华为USG配置案例
- 强叔侃墙 安全策略篇 AS…
- 【拼多多2018校招内推】【编程题】【最大乘积】【大整数相乘】
- LoadRunner安装+汉化+破解
- 华为路由器学习指南-本地策略路由…