对BlackBerry设备存储SQLite数据库 [英] SqLite database on device storage for BlackBerry

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

问题描述

我想创建一个BlackBerry模拟器的设备存储的数据库。
在9500模拟器,成功创建数据库,但在文件系统错误的信息创建表的结果。在9700模拟器,该数据库在创建步骤失败。

有没有这将为所有的仿真数据库​​中的单个code序列?

我写了下面的code:

  URI = URI.create(文件:///store/home/user/Databases/xtc.db);
xtcDB = DatabaseFactory.open(URI);
createTblQurey.append(CREATE TABLE MESSENGER_USERS);
createTblQurey.append(();
createTblQurey.append(USERID INTEGER PRIMARY KEY);
createTblQurey.append(USERNAME TEXT NOT NULL,);
createTblQurey.append(TEXT DISPLAYNAME NOT NULL);
createTblQurey.append(ISREGISTERED CHARACTER DEFAULT'N');
createTblQurey.append());语句= xtcDB.createStatement(createTblQurey.toString());
语句prepare()。
stmt.execute();
Debugger.debug(UrlInfo.workflow_File,MESSENGER_USERS表成功创建... !!!);


解决方案

只有以下BB的设备列表支持在有eMMC的内存至少1 GB的设备内存SQLite数据库。

黑莓9000大胆
Torch 9800的
黑莓Storm 9500
黑莓Storm 2 9550
黑莓Storm 2 9520

这就是为什么你得到了错误的原因。

I am trying to create a database in the device storage of a BlackBerry simulator. In the 9500 simulator, the database is created successfully but creating a table results in a "File System error" message. On the 9700 simulator, the database fails at the creation step.

Is there a single code sequence which will create a database for all simulators?

I have written the following code:

uri = URI.create("file:///store/home/user/Databases/xtc.db");
xtcDB = DatabaseFactory.open(uri);
createTblQurey.append("CREATE TABLE MESSENGER_USERS");
createTblQurey.append("(");
createTblQurey.append("USERID INTEGER PRIMARY KEY,");
createTblQurey.append("USERNAME TEXT NOT NULL,");
createTblQurey.append("DISPLAYNAME TEXT NOT NULL,");
createTblQurey.append("ISREGISTERED CHARACTER DEFAULT 'N'");
createTblQurey.append(")");

stmt = xtcDB.createStatement(createTblQurey.toString());
stmt.prepare();
stmt.execute();
Debugger.debug(UrlInfo.workflow_File,"MESSENGER_USERS table created successfully...!!!");

解决方案

Only following list of BB devices supports SQLite database in device memory that has at least 1 GB of eMMC memory.

Blackberry Bold 9000 Torch 9800 BlackBerry Storm 9500 BlackBerry Storm 2 9550 Blackberry Storm 2 9520

That is the reason why you got error.

这篇关于对BlackBerry设备存储SQLite数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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