please help me I created a database on a Blackberry phone. I also created a table inside the database, but when I click on the database on the Blackberry simulator, it shows UNABLE TO DISPLAY file, and the code I wrote
class CreateDatabaseSchemaScreen extends MainScreen{
Database d;
public CreateDatabaseSchemaScreen(){
try
{
URI myURI = URI.create("file:///SDCard/Databases/SQLite_Guide/" + "MyEncryptedDatabase.db");
DatabaseSecurityOptions dbso = new DatabaseSecurityOptions(true);
d = DatabaseFactory.create(myURI,dbso);
d= DatabaseFactory.open(myURI);
Statement s= d.createStatement("CREATE TABLE 'People' ( " +
"'Name' TEXT, " +
"'Age' INTEGER )" );
s.prepare();
s.execute();
s.close();
d.close();
}
catch ( Exception e )
{
System.out.println( e.getMessage() );
e.printStackTrace();
}
}
}
Bbdev source
share