English 中文(简体)
创建BlackBerry数据库
原标题:Create SQLite database on BlackBerry

Invalid path name. 路径图中没有适当的根基清单。 详见档案资料。

我想创建一种行文套。 我在翻了一番。 我试图以下列方式接手:

    URI dbURI = URI.create("file:///res/db/MyDB.db");
    Database database = DatabaseFactory.create(dbURI);

    URI dbURI = URI.create("file:///db/MyDB.db");
    Database database = DatabaseFactory.create(dbURI);

    URI dbURI = URI.create("/res/db/MyDB.db");
    Database database = DatabaseFactory.create(dbURI);

    URI dbURI = URI.create("/db/MyDB.db");
    Database database = DatabaseFactory.create(dbURI);

I also tried to create SDCard directory on simulator and give this path. None of them worked for me. Please help me.

问题回答

Your res/ directory is for things you want to add to the project, but as far as I m aware you can t create files inside of it after you ve deployed. Regardless, what you should probably do is either create it in a folder on the user s device (probably file:///store/), or on the SD card (file:///SDCard/).





相关问题
add text in http request string url

ok i made a midlet through which i can connect to server pages and get soem information as response. For example i made a midlet through which i acced url: http://example.com/?u=nepal&t=1 Now i ...

Do I have to do a setSize() on a Vector before using it?

Given private final Vector v = new Vector(); //instance variable the following 3 lines are in an instance method in the same class. 1. int length = v.capacity(); 2. int size = v.size(); ...

Is the situation with Java ME improving?

It seems to be the consensus that developing for Java ME is not as cross platform as you might expect, particularly compared to say java SE, but it is difficult to assess how the situation is evolving....

Privileged operations in netbeans mobility

I m writing a Java ME app that will use privileged operations such as messaging. By default the user is prompted to confirm each of these operations, but I would like to run it as a background ...

ClassFormatError: 56 while using hessian in j2me

I am trying to use the hessian j2me implementation @ http://hessian.caucho.com/ using java me sdk 3.0. http://hessian.caucho.com/doc/hessian-overview.xtp#Hessian%20Client%20for%20a%20cell-phone ...

热门标签